added `--file-filter=+` to treat provided input files as filter by firewave · Pull Request #6754 · cppcheck-opensource/cppcheck
ImportProject project;
bool inputAsFilter = false; bool executorAuto = true; int8_t logMissingInclude{0};
if (!mPathNames.empty() && project.projectType != ImportProject::Type::NONE) { if (!inputAsFilter && !mPathNames.empty() && project.projectType != ImportProject::Type::NONE) { mLogger.printError("--project cannot be used in conjunction with source files."); return Result::Fail; }
if (inputAsFilter) { // these will not be resolved and be used literally mSettings.fileFilters.insert(mSettings.fileFilters.cend(), mPathNames.cbegin(), mPathNames.cend()); mPathNames.clear(); }
// Print error only if we have "real" command and expect files if (mPathNames.empty() && project.guiProject.pathNames.empty() && project.fileSettings.empty()) { // TODO: this message differs from the one reported in fillSettingsFromArgs()