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

rustc's -W/A/D/F options should ignore clippy:: lints #69453

Open
jsgf opened this issue Feb 25, 2020 · 1 comment
Open

rustc's -W/A/D/F options should ignore clippy:: lints #69453

jsgf opened this issue Feb 25, 2020 · 1 comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.

Comments

@jsgf
Copy link
Contributor

jsgf commented Feb 25, 2020

In code, rustc will ignore:

#![allow(clippy::foo)]

But it fails with:

$ rustc --crate-type lib --emit metadata -Aclippy::foo t.rs
error[E0602]: unknown lint: `clippy::foo`
  |
  = note: requested on the command line with `-A clippy::foo`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0602`.

It should ignore unknown options consistent with directives in source code.
The current behaviour means that one can't share the same command line when invoking rustc vs clippy-driver.

Meta

rustc --version --verbose:

rustc 1.43.0-nightly (8aa9d2014 2020-02-21)
binary: rustc
commit-hash: 8aa9d2014f4e5258f83b907e8431c59a33acdae7
commit-date: 2020-02-21
host: x86_64-unknown-linux-gnu
release: 1.43.0-nightly
LLVM version: 9.0
@jsgf jsgf added the C-bug Category: This is a bug. label Feb 25, 2020
@matthiaskrgr
Copy link
Member

It would be great if we could just RUSTFLAGS="-Aclippy::foo" for example.
cc rust-lang/rust-clippy#5214

@jyn514 jyn514 added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 27, 2020
@fmease fmease added A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

4 participants