diff options
Diffstat (limited to 'src/ClazyStandaloneMain.cpp')
-rw-r--r-- | src/ClazyStandaloneMain.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp index 39fcd9ae..697091e6 100644 --- a/src/ClazyStandaloneMain.cpp +++ b/src/ClazyStandaloneMain.cpp @@ -65,6 +65,10 @@ from the main file of each translation unit are always displayed.)"), cl::init(""), cl::cat(s_clazyCategory)); +static cl::opt<std::string> s_ignoreDirs("ignore-dirs", cl::desc(R"(Regular expression matching the names of the +directories for which diagnostics should never be emitted. Useful for ignoring 3rdparty code.)"), + cl::init(""), cl::cat(s_clazyCategory)); + static cl::extrahelp s_commonHelp(CommonOptionsParser::HelpMessage); class ClazyToolActionFactory : public clang::tooling::FrontendActionFactory @@ -97,7 +101,7 @@ public: if (s_ignoreIncludedFiles.getValue()) options |= ClazyContext::ClazyOption_IgnoreIncludedFiles; - return new ClazyStandaloneASTAction(s_checks.getValue(), s_headerFilter.getValue(), options); + return new ClazyStandaloneASTAction(s_checks.getValue(), s_headerFilter.getValue(), s_ignoreDirs.getValue(), options); } }; |