diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2024-09-04 22:43:39 +0200 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-10-07 21:39:05 +0200 |
commit | 7d56786edcbdf58b6367fd7f01d5861214ad1c95 (patch) | |
tree | 123478602597212a4c1369df9212a21693839aa6 /Makefile | |
parent | 5e7c9b84ad08cc7a41b2ddbbbaccb60057da3860 (diff) | |
download | linux-stable-7d56786edcbdf58b6367fd7f01d5861214ad1c95.tar.gz linux-stable-7d56786edcbdf58b6367fd7f01d5861214ad1c95.tar.bz2 linux-stable-7d56786edcbdf58b6367fd7f01d5861214ad1c95.zip |
rust: introduce `.clippy.toml`
Some Clippy lints can be configured/tweaked. We will use these knobs to
our advantage in later commits.
This is done via a configuration file, `.clippy.toml` [1]. The file is
currently unstable. This may be a problem in the future, but we can adapt
as needed. In addition, we proposed adding Clippy to the Rust CI's RFL
job [2], so we should be able to catch issues pre-merge.
Thus introduce the file.
Link: https://doc.rust-lang.org/clippy/configuration.html [1]
Link: https://github.com/rust-lang/rust/pull/128928 [2]
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Tested-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://lore.kernel.org/r/20240904204347.168520-12-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -587,6 +587,9 @@ endif # Allows the usage of unstable features in stable compilers. export RUSTC_BOOTSTRAP := 1 +# Allows finding `.clippy.toml` in out-of-srctree builds. +export CLIPPY_CONF_DIR := $(srctree) + export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC HOSTPKG_CONFIG export RUSTC RUSTDOC RUSTFMT RUSTC_OR_CLIPPY_QUIET RUSTC_OR_CLIPPY BINDGEN export HOSTRUSTC KBUILD_HOSTRUSTFLAGS |