Clippy does not respect rules to allow uninlined_format_args
#14694
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
In Rust 1.88 Nightly, there are issues with
cargo clippy
where allowinguninlined_format_args
does not work:allow-mixed-uninlined-format-args = true
inclippy.toml
does nothing, in both projects with a single package and Cargo workspacesCargo.toml
(withuninlined_format_args = "allow"
), does work for a single crate ([lints.clippy]
), but not when it's defined in the workspaceCargo.toml
file ([workspace.lints.clippy]
)I found #12161 but applying the suggestions here does not have any effect.
Everything I mentioned above works fine in Rust 1.86 (stable). These issues might have been caused as part of #14160.
Reproducer
With single crate
Make sure you are using Rust 1.88 Nightly. Create a new package with
cargo init
. In thesrc/main.rs
file, add some code that will trigger theuninlined_format_args
warning:Create a
clippy.toml
file and add the following:Now try to run
cargo clippy
. The expectation is to have the Clippy checks pass with no warnings. However, the actual result is this:If you add the following to
Cargo.toml
, and then reruncargo clippy
, you will get the expected result.With workspaces
Create a Cargo workspace project (with Rust 1.88 Nightly). The root
Cargo.toml
should look something like this:Then, create a new crate. The folder structure should be like so:
The
crates/clippy-test/Cargo.toml
file should look something like this:Then,
main.rs
can be the same as the single crate version:If you try to create a
clippy.toml
file with the sameallow-mixed-uninlined-format-args = true
setting, Clippy will not respect this and still emit the warnings.Trying to set it in the workspace (root)
Cargo.toml
file does not work either. This is the config:However, if you put this in the
clippy-test
crate that we've created, the config option finally works and Clippy works as intended:Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: