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

Split -Dclippy::* categories into individual lints #1023

Open
ojeda opened this issue Jul 15, 2023 · 1 comment
Open

Split -Dclippy::* categories into individual lints #1023

ojeda opened this issue Jul 15, 2023 · 1 comment
Labels
• kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options...

Comments

@ojeda
Copy link
Member

ojeda commented Jul 15, 2023

Denying entire categories is convenient, and works fine for the moment since we pin the compiler version.

However, in the future, we will want to carefully control which lints are enabled, so that new lints do not break the build. Even nowadays, it may make upgrades easier when new lints are added that we do not pass.

linux/Makefile

Lines 457 to 469 in d2e3115

export rust_common_flags := --edition=2021 \
-Zbinary_dep_depinfo=y \
-Dunsafe_op_in_unsafe_fn -Drust_2018_idioms \
-Dunreachable_pub -Dnon_ascii_idents \
-Wmissing_docs \
-Drustdoc::missing_crate_level_docs \
-Dclippy::correctness -Dclippy::style \
-Dclippy::suspicious -Dclippy::complexity \
-Dclippy::perf \
-Dclippy::let_unit_value -Dclippy::mut_mut \
-Dclippy::needless_bitwise_bool \
-Dclippy::needless_continue \
-Wclippy::dbg_macro

@ojeda ojeda added the • kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options... label Jul 15, 2023
@ojeda
Copy link
Member Author

ojeda commented Jul 17, 2023

We may also want to still keep the groups as -W, like C does with e.g. -Wall, if the groups are conservative enough (so that we do not break the build under WERROR often).

Or, if the groups get new lints often and we typically hit those cases, we could just -W the groups under W=1 only (or similar). That way we have an easy way of testing/cleaning things up, e.g. when a new Rust version is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
• kbuild Related to building the kernel, `make`, `Kbuild`, `Kconfig` options...
Development

No branches or pull requests

1 participant