Skip to content

Commit df41835

Browse files
committed
refactor
1 parent 87cd909 commit df41835

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/cppcheck.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,12 +1082,6 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
10821082
}
10831083
#endif
10841084

1085-
if (!mSettings.force &&
1086-
configurations.size() > mSettings.maxConfigs &&
1087-
mSettings.maxConfigs == 12 && // <- do not warn if maxConfigs has been changed
1088-
mSettings.severity.isEnabled(Severity::information))
1089-
tooManyConfigsError(Path::toNativeSeparators(file.spath()), configurations.size());
1090-
10911085
FilesDeleter filesDeleter;
10921086

10931087
// write dump file xml prolog
@@ -1112,8 +1106,13 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
11121106

11131107
// Check only a few configurations (default 12), after that bail out, unless --force
11141108
// was used.
1115-
if (!mSettings.force && ++checkCount > mSettings.maxConfigs)
1109+
if (!mSettings.force && ++checkCount > mSettings.maxConfigs) {
1110+
// if maxConfigs has default value then report information message that configurations are skipped
1111+
if (mSettings.maxConfigs == 12 && mSettings.severity.isEnabled(Severity::information))
1112+
tooManyConfigsError(Path::toNativeSeparators(file.spath()), configurations.size());
1113+
11161114
break;
1115+
}
11171116

11181117
std::string currentConfig;
11191118

0 commit comments

Comments
 (0)