-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add First Draft of Lint Listing Page #1091
Conversation
My lunch break is over now, so I haven't
|
@@ -16,3 +16,6 @@ Cargo.lock | |||
|
|||
# Generated by dogfood | |||
/target_recur/ | |||
|
|||
# hg pages docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you mean gh pages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha, yes
b0cb583
to
20ca605
Compare
info("got %s lints" % len(lints)) | ||
with open("util/gh-pages/lints.json", "w") as file: | ||
json.dump(lints, file, indent=2) | ||
info("wrote JSON for greate justice") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great! But not greate. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I just fixed that useless debug message :D
20ca605
to
ba9eda7
Compare
Anything else (more typos?) you want me to change here? I can't test the travis integration, so someone with the ability to push to this repo needs to create an API key and adjust the travis config. Then we can get this on the road :) |
Some comments:
|
|
|
- Section IDs, with handy anchor links - Multiple filters for levels - Table rendering, block quote size - Nicer loading (hide un-rendered content) - Code highlighting (only for Rust, of course!) - Fix parsing of descriptions that have a newline after the section title (lead to duplicating the title, e.g., "Examples", in the content)
I think I fixed everything you mentioned, @mcarton, except for the open all/close all feature (it's currently really lazy, and thus harder to change all values at once). I have to say, I'm both surprised and shocked by how efficient implementing something like this in angular.js is. The code is anything but nice/performant/zen, but it works 😄 |
Hm, looks like it doesn't get that "example" should start the next section. I'll debug the python script (this might also be a problem when generating the wiki page!).
That's Bootstrap's default style. Do you want me to make it grayscale instead? |
I though it was weird, but if it's Bootstrap leave it. |
@killercup another thing: configuration variables do not appear in your doc (they do in the wiki, see eg. |
My regex was too good. These lint docs say "Example", not "Example:" (with the colon at the end) 😄
Haha, I did not realize saying "Bootstrap" works as an argument from authority!
Oh, they were in an entirely different dict that I did not merge with the lint data at all. Fixed that. Also learned some python tricks along the way! |
Anything else I need to fix? Someone still needs to add and test the travis config. |
I'm fine with this. |
Huh, there's no way to give you access either. hold on. |
Emailed a deploy key. I assume you're able to run travis encrypt locally? |
@killercup just realized when you have a filter and click a link to a lint that's filtered out, nothing happens. Is there some JS voodoo magic you could had here? 😄 Eg.:
|
Oh, very interesting, @mcarton! I hadn't tested the inter-lint-links at all (didn't even know they existed tbh). Can you make that into a new issue and assign it to me, so I don't forget to fix this? :) |
That one exists since https://github.com/Manishearth/rust-clippy/pull/1146, there might have been some other but that's a good idea IMO. |
cf. #1088
Test:
clone this branch and run
$ python util/export.py $ cd util/gh-pages $ python -m SimpleHTTPServer 8080