Congcong Cai 4558e45e7e
[clang-tidy] add option to avoid "no checks enabled" error (#96122)
When clang-tidy get an empty checks, it will throw "no checks enabled"
error and exit with non-zero return value.
It make clang-tidy's wrapper program confused when in big project some
files don't want to be checked and use `-checks=-*` to disable all
checks.

---------

Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
2024-06-27 07:27:58 +08:00

5 lines
156 B
C++

// RUN: not clang-tidy %s -checks='-*'
// RUN: clang-tidy %s -checks='-*' --allow-no-checks | FileCheck --match-full-lines %s
// CHECK: No checks enabled.