Issue |
136659
|
Summary |
.clang-tidy not automatically found by clang-tidy 20.1.2
|
Labels |
clang-tidy
|
Assignees |
|
Reporter |
kenchung285
|
I have a project that originally used clang-tidy 19.1.7, and we've recently upgraded to version 20.1.2. After upgrading, I've noticed a change in behavior regarding `.clang-tidy` file discovery.
In 19.1.7, `clang-tidy` was able to discover and apply our self-defined `.clang-tidy` files without explicitly passing the `-config-file` option. However, in 20.1.2, `clang-tidy` no longer discovers the `.clang-tidy` file at the project root unless we explicitly pass `-config-file`.
Worse, if we do pass the `-config-file` flag (pointing to the one in the project root), `clang-tidy` seems to ignore the `.clang-tidy` file under folder B, even when checking files located in that folder.
Here is the relevant directory structure:
```
project-root/
├── README.md
├── .clang-tidy # Full rule config
├── folder A/
│ ├── some source files
│ └── ...
├── folder B/
│ └── .clang-tidy # Contains "Checks: '-*'" to disable checks in this folder
└── folder C/
├── other source files
└── ...
```
Expected behavior:
* Without `-config-file`, `clang-tidy` should discover and respect both the project-root `.clang-tidy` and the one under `folder B`.
Actual behavior:
* Without `-config-file`, `.clang-tidy` is not discovered at all in 20.1.2.
* With `-config-file`, `.clang-tidy` in `folder B` is ignored.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs