Description
After completion of #146482, there would be no default checks enable, which can potentially confuse users.
We should provide an easy way to start using clang-tidy for new users.
I propose a new option --dump-default-config
or --create-default-config
. This option will create a .clang-tidy
config with some checks enabled by default. The default config will be a good start for users to "just run analysis" and later explore more checks.
The list of default checks is largely debatable, possible a mixture of bugprone
, modernize
, misc
and performace
that has a low number of false positives.
Alternative solution suggested by @nicovank:
If no checks are enabled, the default config should just be used directly. Maybe adding warnings saying 1. the default config/checks will be used and 2. use --dump-default-config
to get started with a custom configuration file in that directory. It's better user experience to just run with the default config immediately rather than add one setup step.