summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
index 4e815c0d174..86def378e5b 100644
--- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
+++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
@@ -34,29 +34,34 @@ const char DefaultChecks[] =
"-llvm-namespace-comment," // Not complete.
"-google-*,"; // Doesn't apply to LLVM.
static cl::opt<std::string>
-Checks("checks",
- cl::desc("Comma-separated list of positive and negative globs matching\n"
- "the names of the checks to be run."),
+Checks("checks", cl::desc("Comma-separated list of globs with optional '-'\n"
+ "prefix. Globs are processed in order of appearance\n"
+ "in the list. Globs without '-' prefix add checks\n"
+ "with matching names to the set, globs with the '-'\n"
+ "prefix remove checks with matching names from the\n"
+ "set of enabled checks."),
cl::init(""), cl::cat(ClangTidyCategory));
-static cl::opt<std::string> HeaderFilter(
- "header-filter",
- cl::desc("Regular expression matching the names of the headers to output\n"
- "diagnostics from. Diagnostics from the main file of each\n"
- "translation unit are always displayed."),
- cl::init(""), cl::cat(ClangTidyCategory));
+static cl::opt<std::string>
+HeaderFilter("header-filter",
+ cl::desc("Regular expression matching the names of the\n"
+ "headers to output diagnostics from.\n"
+ "Diagnostics from the main file of each\n"
+ "translation unit are always displayed."),
+ cl::init(""), cl::cat(ClangTidyCategory));
static cl::opt<bool> Fix("fix", cl::desc("Fix detected errors if possible."),
cl::init(false), cl::cat(ClangTidyCategory));
-static cl::opt<bool> ListChecks("list-checks",
- cl::desc("List all enabled checks and exit."),
- cl::init(false), cl::cat(ClangTidyCategory));
-
-static cl::opt<bool> AnalyzeTemporaryDtors(
- "analyze-temporary-dtors",
- cl::desc("Enable temporary destructor-aware analysis in clang-analyzer- "
- "checks."),
- cl::init(false),
- cl::cat(ClangTidyCategory));
+static cl::opt<bool>
+ListChecks("list-checks",
+ cl::desc("List all enabled checks and exit. Use with\n"
+ "-checks='*' to list all available checks."),
+ cl::init(false), cl::cat(ClangTidyCategory));
+
+static cl::opt<bool>
+AnalyzeTemporaryDtors("analyze-temporary-dtors",
+ cl::desc("Enable temporary destructor-aware analysis in\n"
+ "clang-analyzer- checks."),
+ cl::init(false), cl::cat(ClangTidyCategory));
static void printStats(const clang::tidy::ClangTidyStats &Stats) {
unsigned ErrorsIgnored = Stats.ErrorsIgnoredNOLINT +
OpenPOWER on IntegriCloud