Currently, clang-tidy supports specifying CheckOptions in two ways:
Old way, which has been removed from the documentation:
CheckOptions: [
{ key: x, value: y},
]
New way, showing in the documentation:
CheckOptions:
x: y
The source code handling the YAML parsing still supports the old way, for backwards compatibility reasons. This makes the code more complicated than it needs to be to support a no longer documented feature. Complex code is hard to understand, maintain and extend.
Therefore, it would be good to deprecate the old key-value format to be able to clean the YAML parser. We could print a warning so people get informed, and even create a tool that automatically converts a .clang-tidy file from the old format into the new format to save people time, easing the transition.
As a matter of fact, the --dump-config option already only dumps the new version, so there's not much of a point in keeping support for the older version.
Currently, clang-tidy supports specifying
CheckOptions
in two ways:The source code handling the YAML parsing still supports the old way, for backwards compatibility reasons. This makes the code more complicated than it needs to be to support a no longer documented feature. Complex code is hard to understand, maintain and extend.
Therefore, it would be good to deprecate the old key-value format to be able to clean the YAML parser. We could print a warning so people get informed, and even create a tool that automatically converts a .clang-tidy file from the old format into the new format to save people time, easing the transition.
As a matter of fact, the
--dump-config
option already only dumps the new version, so there's not much of a point in keeping support for the older version.