Allow filtering when using --project (#2522)

This commit is contained in:
Mathias Buhr 2020-02-09 10:51:29 +01:00 committed by GitHub
parent 6d4eff46be
commit 60ada656a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ bool CppCheckExecutor::parseFromArgs(CppCheck *cppcheck, int argc, const char* c
if (!ignored.empty())
std::cout << "cppcheck: Maybe all paths were ignored?" << std::endl;
return false;
} else if (!mSettings->fileFilter.empty()) {
} else if (!mSettings->fileFilter.empty() && settings.project.fileSettings.empty()) {
std::map<std::string, std::size_t> newMap;
for (std::map<std::string, std::size_t>::const_iterator i = mFiles.begin(); i != mFiles.end(); ++i)
if (matchglob(mSettings->fileFilter, i->first)) {