I want to configure readability-identifier-naming
checker for clang-tidy running on my codebase.
The checker in clang-tidy can be provided with CheckOptions, such like:
clang-tidy -checks='-*,readability-identifier-naming' \
-config="{CheckOptions: [ {key: readability-identifier-naming.ClassCase, value: CamelCase} ]}" main.cpp
An option can also be specified in a .clang-tidy file.
Where do I find the list of available options (for a readability-identifier-naming
check in this case) like e.g. the ClassCase
from the line of code above?
The official documentation is not very specific, saying only "Many configuration options are available, in order to be able to create different rules for different kind of identifier."
I have found this page on github, which explains it in a bit more detail (but still does not solve the problem).
I have also found a huge list in a file on a Microsoft's repository, but I have no idea where did they get that from.
I thought, that maybe clang-tidy would dump all the possible options if asked for. If you run
clang-tidy -checks=* --dump-config
(or while specifying only readability-identifier-naming
checker. It doesn't really matter, the output is the same)
clang-tidy -checks='-*,readability-identifier-naming --dump-config
the dumped file includes only one option with respect to readability-identifier-naming, which is:
- key: readability-identifier-naming.IgnoreFailedSplit
value: '0'
I was also trying to go through clang-tidy source code, but did not succeed.
I would be grateful if someone could point me to a place (if it exists) with the list of all the available CheckOptions.
Where do I find the list of available options (for a readability-identifier-naming check in this case) like e.g. the ClassCase from the line of code above?
The list has since appeared on the page you originally linked to here.
I have found this page on github, which explains it in a bit more detail (but still does not solve the problem).
Now it does!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With