Show which rules are being processed (#2916)

This commit is contained in:
Paul Fultz II 2020-11-22 01:46:50 -06:00 committed by GitHub
parent ef31b70bf4
commit bf00d521d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1143,6 +1143,10 @@ void CppCheck::executeRules(const std::string &tokenlist, const Tokenizer &token
if (rule.pattern.empty() || rule.id.empty() || rule.severity == Severity::none || rule.tokenlist != tokenlist)
continue;
if (!mSettings.quiet) {
reportOut("Processing rule: " + rule.pattern);
}
const char *pcreCompileErrorStr = nullptr;
int erroffset = 0;
pcre * const re = pcre_compile(rule.pattern.c_str(),0,&pcreCompileErrorStr,&erroffset,nullptr);