llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.83k stars 11k forks source link

Deprecate key-value syntax in CheckOptions #64049

Open carlosgalvezp opened 11 months ago

carlosgalvezp commented 11 months ago

Currently, clang-tidy supports specifying CheckOptions in two ways:

CheckOptions: [
{ key: x, value: 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.

llvmbot commented 11 months ago

@llvm/issue-subscribers-clang-tidy