1// RUN: clang-tidy -checks=-*,modernize-use-nullptr -explain-config | FileCheck --check-prefix=CHECK-MESSAGE1 %s
2// RUN: clang-tidy -config="{Checks: '-*,modernize-use-nullptr'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE2 %s
3// RUN: clang-tidy -checks=modernize-use-nullptr -config="{Checks: '-*,modernize-use-nullptr'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE3 %s
4// RUN: clang-tidy -checks=modernize-use-nullptr -config="{Checks: '-*,-modernize-use-nullptr'}" %S/Inputs/explain-config/a.cc -explain-config -- | FileCheck --check-prefix=CHECK-MESSAGE4 %s
5// RUN: clang-tidy -checks=modernize-use-nullptr -config="{Checks: '-*,modernize-*'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE5 %s
6// RUN: clang-tidy -explain-config %S/Inputs/explain-config/a.cc -- | grep "'modernize-use-nullptr' is enabled in the .*[/\\]Inputs[/\\]explain-config[/\\].clang-tidy."
7
8// CHECK-MESSAGE1: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
9// CHECK-MESSAGE2: 'modernize-use-nullptr' is enabled in the command-line option '-config'.
10// CHECK-MESSAGE3: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
11// CHECK-MESSAGE4: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
12// CHECK-MESSAGE5: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
13

source code of clang-tools-extra/test/clang-tidy/infrastructure/explain-checks.cpp