Skip to content

Interest in More Custom Clippy Docs/Website? #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
killercup opened this issue Jul 12, 2016 · 9 comments
Closed

Interest in More Custom Clippy Docs/Website? #1088

killercup opened this issue Jul 12, 2016 · 9 comments
Labels
A-website Area: Improving the clippy website

Comments

@killercup
Copy link
Member

Clippy's docs (the wiki page) is getting longer and longer and could be improved quite a bit by adding a more custom search with a few filter options. cmd+f works okay, but only too a certain extend.

I think I could whip something up quite quickly by dumping the lint info not to a wiki string, but into a JSON file. The result would looks like bitrust, but with lints instead of commits.

Would this be something you'd like to have? Do you have some other ideas for this?

@Manishearth
Copy link
Member

👍

@mcarton
Copy link
Member

mcarton commented Jul 12, 2016

Something like this should be able to automatically update when we push to master (even better: when we release a new version, Travis tests tags I believe).
Cc https://github.com/Manishearth/rust-clippy/issues/569.


Also I'm not a big fan of JavaScript heavy websites (but I guess it's my fault for not living with my time):

screen shot 2016-07-12 at 13 28 27

@killercup
Copy link
Member Author

Also I'm not a big fan of JavaScript heavy websites

Me too, as really often it's not necessary. Sadly, it's much easier to do that (take JSON, filter by fields, output HTML). I'm probably going to copy that page and just adjust the output a bit.

It's not set in stone, though, feel free to change it :)

@tillarnold
Copy link

I don't know how relevant this is to clippy but anyways: At work we use an older version of jshint. And while configuring jshint I had some problems because some things had different names in the old version or had some other subtle differences. But the jshint website only shows the documentation for the newest version. I probably could have tried to build an old version of the webpage locally but I just ended up looking at the code and figuring things out this way. I don't know if this would be difficult to do but it might be nice if you could see the documentation for the lints for all releases of clippy. (Like with a little dropdown where you can select the version) But I don't think that that's really important. I't would just be nice to have.

@mcarton
Copy link
Member

mcarton commented Jul 15, 2016

I try to maintain a changelog for Clippy with new lints, breaking changes in rustc API and other random things I fell should be in there. But I'm pretty sure I forgot to update it more than once.

@killercup
Copy link
Member Author

killercup commented Jul 15, 2016

Hm, versioning clippy docs is interesting. A use case: I may be stuck on a specific nightly that requires me to stay on an older clippy release.

There are a few things we could do to supply versioned docs:

  • Only update the gh-pages branch when a new git tag is published (= new release) and use https://rawgit.com to link to older versions
  • Keep versioned JSON files in the gh-pages branch and make them selectable (lints.json is currently 83kB uncompressed)
  • Embed the docs into cargo clippy, e.g. cargo clippy --help=lints

@mcarton
Copy link
Member

mcarton commented Jul 15, 2016

IMO the doc should be available at whatever/v0.0.xy/index with a redirection on whatever/current/index and all docs should stay there forever. I don't see the point of https://rawgit.com 😕
(Bonus point if the old docs contain whatever tag search engines need to know where is the lastest version. Google tends to give a random old version of any page of Boost docs)

As for embedding the docs in cargo clippy, why not, but generating them requires python and Clippy’s sources. This could be done in a build.rs, but can cargo install currently install any data files?

@oli-obk
Copy link
Contributor

oli-obk commented Sep 1, 2017

Are there any more actions required to resolve this issue?

@killercup
Copy link
Member Author

I don't think so. Just ping me if something comes up!

@phansch phansch added the A-website Area: Improving the clippy website label Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-website Area: Improving the clippy website
Projects
None yet
Development

No branches or pull requests

6 participants