Tweaked the --check-library output so configured methods will not be shown

This commit is contained in:
Daniel Marjamäki 2017-10-10 10:18:03 +02:00
parent fcba5b88c2
commit abc3779e61
1 changed files with 5 additions and 1 deletions

View File

@ -437,9 +437,13 @@ void CheckFunctions::checkLibraryMatchFunctions()
if (!_settings->library.isNotLibraryFunction(tok))
continue;
const std::string &functionName = _settings->library.getFunctionName(tok);
if (functionName.empty() || _settings->library.functions.find(functionName) != _settings->library.functions.end())
continue;
reportError(tok,
Severity::information,
"checkLibraryFunction",
"--check-library: There is no matching configuration for function " + _settings->library.getFunctionName(tok) + "()");
"--check-library: There is no matching configuration for function " + functionName + "()");
}
}