Skip to content
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

move lint documentation into macro invocations #3845

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Mar 5, 2019

This PR moves lint documentation inside declare_clippy_lint! macro invocations, to avoid triggering the unused_doc_comments lint once it's modified in rust-lang/rust#57882. This PR is necessary to unblock that work, since the large number of warnings generated in clippy_lints causes Travis to hit the log length limit.

This PR also updates the documentation and website generation script.

It would be nice to get a clippy update in the Rust repo once this is merged.

cc @phansch

@euclio euclio changed the title move lint documentation into macro expansion move lint documentation into macro invocations Mar 5, 2019
@phansch
Copy link
Member

phansch commented Mar 5, 2019

Thanks for the PR! I must admit that I've never really written a lot of macros. Is there any way to keep the documentation before the macro calls and pass the doc attribute through to declare_tool_lint!?
I ask because we currently have some python magic that parses the declare_clippy_lints! calls and the documentation that is before them. If there's no way to pass through the documentation from in front of the macro, then the logic will have to be updated.

Apart from that question, this makes me really happy because it means that the lint documentation is now doc-tested 🎊
It looks like a lot of the doc tests are currently failing, which is not really surprising. I would be fine with putting ignore on the failing ones for now to get this PR merged.

@euclio
Copy link
Contributor Author

euclio commented Mar 5, 2019

There isn't a way to keep the documentation before the macro calls, since it gets removed when the macro gets expanded. However, I've actually updated the python script already -- though it probably got lost in this massive diff 😅

I'll push a commit later today to fix the failing doc tests.

@euclio
Copy link
Contributor Author

euclio commented Mar 6, 2019

Ok, should be good to go. I ignored most of the doc tests, but I fixed a few that were trivial to fix.

@phansch
Copy link
Member

phansch commented Mar 6, 2019

LGTM, thanks again!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 6, 2019

📌 Commit a9de64a has been approved by phansch

@bors
Copy link
Collaborator

bors commented Mar 6, 2019

⌛ Testing commit a9de64a with merge 15d1731...

bors added a commit that referenced this pull request Mar 6, 2019
move lint documentation into macro invocations

This PR moves lint documentation inside `declare_clippy_lint!` macro invocations, to avoid triggering the `unused_doc_comments` lint once it's modified in rust-lang/rust#57882. This PR is necessary to unblock that work, since the large number of warnings generated in `clippy_lints` causes Travis to hit the log length limit.

This PR also updates the documentation and website generation script.

It would be nice to get a clippy update in the Rust repo once this is merged.

cc @phansch
@bors
Copy link
Collaborator

bors commented Mar 6, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 15d1731 to master...

@bors bors merged commit a9de64a into rust-lang:master Mar 6, 2019
@phansch phansch mentioned this pull request Mar 6, 2019
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants