diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs index 1bd9bffff06..8477183ae56 100644 --- a/clippy_dev/src/lib.rs +++ b/clippy_dev/src/lib.rs @@ -93,6 +93,8 @@ fn parse_contents(content: &str, filename: &str) -> impl Iterator { /// Collects all .rs files in the `clippy_lints/src` directory fn lint_files() -> impl Iterator { + // We use `WalkDir` instead of `fs::read_dir` here in order to recurse into subdirectories. + // Otherwise we would not collect all the lints, for example in `clippy_lints/src/methods/`. WalkDir::new("../clippy_lints/src") .into_iter() .filter_map(|f| f.ok())