summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/infrastructure/explain-checks.cpp
blob: 9bff30c2090c676f5dc6cb4c3c288ec7a7b36e04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: clang-tidy -checks=-*,modernize-use-nullptr -explain-config | FileCheck --check-prefix=CHECK-MESSAGE1 %s
// RUN: clang-tidy -config="{Checks: '-*,modernize-use-nullptr'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE2 %s
// RUN: clang-tidy -checks=modernize-use-nullptr -config="{Checks: '-*,modernize-use-nullptr'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE3 %s
// 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
// RUN: clang-tidy -checks=modernize-use-nullptr -config="{Checks: '-*,modernize-*'}" -explain-config | FileCheck --check-prefix=CHECK-MESSAGE5 %s
// RUN: clang-tidy -explain-config %S/Inputs/explain-config/a.cc -- | grep "'modernize-use-nullptr' is enabled in the .*[/\\]Inputs[/\\]explain-config[/\\].clang-tidy."

// CHECK-MESSAGE1: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
// CHECK-MESSAGE2: 'modernize-use-nullptr' is enabled in the command-line option '-config'.
// CHECK-MESSAGE3: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
// CHECK-MESSAGE4: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
// CHECK-MESSAGE5: 'modernize-use-nullptr' is enabled in the command-line option '-checks'.
OpenPOWER on IntegriCloud