Hi!
Since ⚙ D128337 [clang-tidy] Extend spelling for CheckOptions, clang-tidy supports a much more readable way of specifying the CheckOptions
field, using native YAML syntax:
CheckOptions:
x: y
Instead of the old key-value way:
CheckOptions: [
{ key: x, value: y},
]
The old format has been removed from the documentation, and --dump-config
flag also dumps the config in the new format.
However we still keep the internal code to handle both versions with the goal of backwards compatibility. This adds extra complexity and maintenance cost, making it harder to improve or extend. It’s also confusing to have multiple ways of specifying the same thing.
Thus I would like to propose to deprecate the old key-value format, possibly printing a warning and creating supporting tools to automate the migration (or maybe --dump-config
is already enough?).
Deprecation would mean that we warn in clang-tidy 18 and fully remove support in clang-tidy 20. What do you think?