@@ -1079,7 +1079,7 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
10791079 }
10801080#endif
10811081
1082- if (!mSettings .force && configurations.size () > mSettings .maxConfigs )
1082+ if (!mSettings .force && mSettings . isEnabled (Severity::information) && configurations.size () > mSettings .maxConfigs )
10831083 tooManyConfigsError (Path::toNativeSeparators (file.spath ()), configurations.size ());
10841084
10851085 FilesDeleter filesDeleter;
@@ -1656,27 +1656,14 @@ void CppCheck::executeAddonsWholeProgram(const std::list<FileWithDetails> &files
16561656
16571657void CppCheck::tooManyConfigsError (const std::string &file, const int numberOfConfigurations)
16581658{
1659- if (!mSettings .severity .isEnabled (Severity::information))
1660- return ;
1661-
16621659 std::list<ErrorMessage::FileLocation> loclist;
16631660 if (!file.empty ()) {
16641661 loclist.emplace_back (file, 0 , 0 );
16651662 }
16661663
16671664 std::ostringstream msg;
1668- msg << " Too many #ifdef configurations - cppcheck only checks " << mSettings .maxConfigs ;
1669- if (numberOfConfigurations > mSettings .maxConfigs )
1670- msg << " of " << numberOfConfigurations << " configurations. Use --force to check all configurations.\n " ;
1671- if (file.empty ())
1672- msg << " configurations. Use --force to check all configurations. For more details, use --enable=information.\n " ;
1673- msg << " The checking of the file will be interrupted because there are too many "
1674- " #ifdef configurations. Checking of all #ifdef configurations can be forced "
1675- " by --force command line option or from GUI preferences. However that may "
1676- " increase the checking time." ;
1677- if (file.empty ())
1678- msg << " For more details, use --enable=information." ;
1679-
1665+ msg << " Too many #ifdef configurations - cppcheck only checks " << mSettings .maxConfigs
1666+ << " of " << numberOfConfigurations << " configurations. Use --force to check all configurations." ;
16801667
16811668 ErrorMessage errmsg (std::move (loclist),
16821669 " " ,
0 commit comments