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

Lint docs: Deprecated lints don't expand #4748

Closed
phansch opened this issue Oct 28, 2019 · 1 comment · Fixed by #4757
Closed

Lint docs: Deprecated lints don't expand #4748

phansch opened this issue Oct 28, 2019 · 1 comment · Fixed by #4757
Labels
A-documentation Area: Adding or improving documentation A-website Area: Improving the clippy website C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy

Comments

@phansch
Copy link
Member

phansch commented Oct 28, 2019

reported in Discord by @evanjs: Deprecated lints in the docs don't expand:
https://rust-lang.github.io/rust-clippy/master/#misaligned_transmute

This is probably because the doc comments need to be moved above the pub LINT_NAME line so that the lintlib.py script picks them up again.

@phansch phansch added C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy A-documentation Area: Adding or improving documentation A-website Area: Improving the clippy website labels Oct 28, 2019
evanjs added a commit to evanjs/rust-clippy that referenced this issue Oct 31, 2019
- Move doc comments inside of declare_deprecated_lint macros so that they
  are picked up by lintlib.py
evanjs added a commit to evanjs/rust-clippy that referenced this issue Oct 31, 2019
- Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py
bors added a commit that referenced this issue Nov 3, 2019
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes #4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those #4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)
bors added a commit that referenced this issue Nov 3, 2019
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes #4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those #4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)

changelog: Show deprecated lints in lint documentation again
@euclio
Copy link
Contributor

euclio commented Nov 3, 2019

This should've been caught by rustc. Looks like deprecated_lints.rs is missing an associated mod deprecated_lints; in clippy_lints/src/lib.rs.

I would submit a PR to fix this, but it looks like the lint infrastructure has drifted away from working with what's currently in deprecated_lints.rs, so I'm not sure what needs to change to register the passes properly.

flip1995 added a commit to flip1995/rust-clippy that referenced this issue Nov 7, 2019
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes rust-lang#4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those rust-lang#4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)

changelog: Show deprecated lints in lint documentation again
flip1995 added a commit to flip1995/rust-clippy that referenced this issue Nov 7, 2019
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes rust-lang#4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those rust-lang#4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)

changelog: Show deprecated lints in lint documentation again
bors added a commit that referenced this issue Nov 7, 2019
Fix Deprecated lints don't expand

### Move doc comments inside of declare_deprecated_lint macros so that they are picked up by lintlib.py

### fixes #4748

Unable to `cargo test` locally (I'm on NixOS, and keep getting errors that are similar to those #4714 might solve) but I have verified that all deprecated lints can now be expanded like other lints.

![2019-10-30_21:06:28](https://user-images.githubusercontent.com/1847524/67910501-5815de00-fb59-11e9-9fa2-91fe6a8b9bb9.png)

changelog: Show deprecated lints in lint documentation again
@bors bors closed this as completed in 94e3551 Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documentation Area: Adding or improving documentation A-website Area: Improving the clippy website C-bug Category: Clippy is not doing the correct thing good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants