mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 10:18:25 +00:00
Do not look for Cargo.toml
inside target
(#15692)
This test, which checks that we do not define new profiles directly in Clippy's multiple `Cargo.toml` files, must not look inside `target` as `lintcheck` might place some third-party sources there. Of course those third-party sources are allowed to define profiles in their `Cargo.toml`. changelog: none
This commit is contained in:
commit
a67fe9c35d
@ -17,6 +17,9 @@ fn no_profile_in_cargo_toml() {
|
||||
// keep it fast and simple.
|
||||
for entry in WalkDir::new(".")
|
||||
.into_iter()
|
||||
// Do not recurse into `target` as lintcheck might put some sources (and their
|
||||
// `Cargo.toml`) there.
|
||||
.filter_entry(|e| e.file_name() != "target")
|
||||
.filter_map(Result::ok)
|
||||
.filter(|e| e.file_name().to_str() == Some("Cargo.toml"))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user