[clang-tools-extra] readability-identifier-naming should add universal default options (PR #171686)

Dominik Kaszewski via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 10 12:57:25 PST 2025


dkaszews wrote:

I am having trouble running tests. I run them as:

```shell
$ PATH="$HOME/code/llvm-project/build/bin:$PATH" \
  ./check_clang_tidy.py \
  checkers/readability/identifier-naming-default-lower.cpp \
  readability-identifier-naming \
  /tmp/test -std=c++17
```

The `-std=c++17` part is just to shorten the output.

I would expect the test to fail, but it just produces empty output:

```txt
Running ['clang-tidy', '--experimental-custom-checks', '/tmp/test.cpp', '-fix',
'--checks=-*,readability-identifier-naming', '--config={}', '--', '-std=c++17', '-nostdinc++']...
------------------------ clang-tidy output -----------------------

------------------------------------------------------------------
------------------------------ Fixes -----------------------------

------------------------------------------------------------------
``` 

That `--config={}` is suspicious to me, since my test file does start with the following:

```cpp
// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \
// RUN:   -config='{CheckOptions: { \
// RUN:     readability-identifier-naming.DefaultCase: "lower_case" }}'
```

If I try running any other tests such as `identifier-naming-empty-options.cpp`, then I can also see the empty config and the test actually fails (mine doesn't only because I didn't yet add any checks).

Is the `check_clang_tidy` broken on the main branch? My local base is:

```shell
54b4bd510a8c  2025-12-10 15:32:27 +0000  Tom Eccles  [upstream/main, upstream/HEAD, main]
[flang][AliasAnalysis] Cray pointers/pointees might alias with anything (#170900)
```

https://github.com/llvm/llvm-project/pull/171686


More information about the cfe-commits mailing list