<p dir="ltr"><br>
On 15 May 2014 10:03, "Manuel Klimek" <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>
><br>
> After thinking a bit about this, I'd like to revisit this from scratch (as it has changed quite a bit).<br>
><br>
> Why is: -check=<regexp> not enough? Give it a good enough default value (that is printed if you say -help), and we have the following use cases:<br>
> - add something to the default set: clang-tidy -help, copy default set, add own</p>
<p dir="ltr">This is already problematic: making the user copy default value and adjust it is inconvenient. Also, how do you exclude something? Say, you run clang-tidy and see a number of results from checks you don't care about. How do you exclude them?</p>

<p dir="ltr">> - run only a single check: -check=my-full.check<br>
> - run only google checks: -check=google-.*<br>
><br>
><br>
><br>
><br>
><br>
> On Wed, May 14, 2014 at 10:13 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> wrote:<br>
>><br>
>> Hi klimek,<br>
>><br>
>> Make checks filtering more intuitive and easy to use. Remove<br>
>> -disable-checks and change the format of -checks= to a comma-separated list of<br>
>> globs with optional '-' prefix to denote exclusion. The -checks= option is now<br>
>> cumulative, so it modifies defaults, not overrides them. Each glob adds or<br>
>> removes to the current set of checks, so the filter can be refined or overriden<br>
>> by adding globs.<br>
>><br>
>> Example:<br>
>>   The default value for -checks= is<br>
>>   '*,-clang-analyzer-alpha*,-llvm-include-order,-llvm-namespace-comment,-google-*',<br>
>>   which allows all checks except for the ones named clang-analyzer-alpha* and<br>
>>   others specified with the leading '-'. To allow all google-* checks one can<br>
>>   write:<br>
>>     clang-tidy -checks=google-* ...<br>
>>   If one needs only google-* checks, we first need to remove everything (-*):<br>
>>     clang-tidy -checks=-*,google-*<br>
>>   etc.<br>
>><br>
>> I'm not sure if we need to change something here, so I didn't touch the docs<br>
>> yet.<br>
>><br>
>> <a href="http://reviews.llvm.org/D3770">http://reviews.llvm.org/D3770</a><br>
>><br>
>> Files:<br>
>>   clang-tidy/ClangTidyDiagnosticConsumer.cpp<br>
>>   clang-tidy/ClangTidyDiagnosticConsumer.h<br>
>>   clang-tidy/ClangTidyOptions.h<br>
>>   clang-tidy/tool/ClangTidyMain.cpp<br>
>>   test/clang-tidy/arg-comments.cpp<br>
>>   test/clang-tidy/basic.cpp<br>
>>   test/clang-tidy/check_clang_tidy_fix.sh<br>
>>   test/clang-tidy/check_clang_tidy_output.sh<br>
>>   test/clang-tidy/deduplication.cpp<br>
>>   test/clang-tidy/diagnostic.cpp<br>
>>   test/clang-tidy/file-filter.cpp<br>
>>   test/clang-tidy/fix.cpp<br>
>>   test/clang-tidy/macros.cpp<br>
>>   test/clang-tidy/nolint.cpp<br>
>>   test/clang-tidy/select-checks.cpp<br>
>>   test/clang-tidy/static-analyzer.cpp<br>
>>   test/clang-tidy/temporaries.cpp<br>
>>   unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp<br>
><br>
><br>
</p>