@@ -1060,7 +1060,7 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
10601060 }
10611061#endif
10621062
1063- if (!mSettings .force && configurations.size () > mSettings .maxConfigs )
1063+ if (!mSettings .force && mSettings . isEnabled (Severity::information) && configurations.size () > mSettings .maxConfigs )
10641064 tooManyConfigsError (Path::toNativeSeparators (file.spath ()), configurations.size ());
10651065
10661066 FilesDeleter filesDeleter;
@@ -1625,27 +1625,14 @@ void CppCheck::executeAddonsWholeProgram(const std::list<FileWithDetails> &files
16251625
16261626void CppCheck::tooManyConfigsError (const std::string &file, const int numberOfConfigurations)
16271627{
1628- if (!mSettings .severity .isEnabled (Severity::information))
1629- return ;
1630-
16311628 std::list<ErrorMessage::FileLocation> loclist;
16321629 if (!file.empty ()) {
16331630 loclist.emplace_back (file, 0 , 0 );
16341631 }
16351632
16361633 std::ostringstream msg;
1637- msg << " Too many #ifdef configurations - cppcheck only checks " << mSettings .maxConfigs ;
1638- if (numberOfConfigurations > mSettings .maxConfigs )
1639- msg << " of " << numberOfConfigurations << " configurations. Use --force to check all configurations.\n " ;
1640- if (file.empty ())
1641- msg << " configurations. Use --force to check all configurations. For more details, use --enable=information.\n " ;
1642- msg << " The checking of the file will be interrupted because there are too many "
1643- " #ifdef configurations. Checking of all #ifdef configurations can be forced "
1644- " by --force command line option or from GUI preferences. However that may "
1645- " increase the checking time." ;
1646- if (file.empty ())
1647- msg << " For more details, use --enable=information." ;
1648-
1634+ msg << " Too many #ifdef configurations - cppcheck only checks " << mSettings .maxConfigs
1635+ << " of " << numberOfConfigurations << " configurations. Use --force to check all configurations." ;
16491636
16501637 ErrorMessage errmsg (std::move (loclist),
16511638 " " ,
0 commit comments