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

Clippy does not run on proc macro crates #2526

Closed
dtolnay opened this issue Mar 13, 2018 · 0 comments · Fixed by #3811
Closed

Clippy does not run on proc macro crates #2526

dtolnay opened this issue Mar 13, 2018 · 0 comments · Fixed by #3811
Labels
C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't T-macros Type: Issues with macros and macro expansion

Comments

@dtolnay
Copy link
Member

dtolnay commented Mar 13, 2018

#!/bin/sh

cargo new repro
echo >repro/src/lib.rs '
#[allow(dead_code)]
fn f() {
    let _x = 3.14;
}
'

echo >>repro/Cargo.toml '
[lib]
proc-macro = true
'

cargo clippy --manifest-path=repro/Cargo.toml

The same script without proc-macro = true does catch the approx_constant lint.

@phansch phansch added C-bug Category: Clippy is not doing the correct thing T-macros Type: Issues with macros and macro expansion labels Apr 1, 2018
mcarton added a commit that referenced this issue Feb 24, 2019
mcarton added a commit that referenced this issue Feb 24, 2019
bors added a commit that referenced this issue Feb 24, 2019
Add a test for #2526

Closes #2526, which seems to have been fixed at some point, but I couldn't find a test for it.
mcarton added a commit that referenced this issue Feb 24, 2019
bors added a commit that referenced this issue Feb 24, 2019
Add a test for #2526

Closes #2526, which seems to have been fixed at some point, but I couldn't find a test for it.
@rustbot rustbot added the I-false-negative Issue: The lint should have been triggered on code, but wasn't label Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing I-false-negative Issue: The lint should have been triggered on code, but wasn't T-macros Type: Issues with macros and macro expansion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants