diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 53257591273..25dc2712727 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1506,7 +1506,7 @@ void CheckOther::commaSeparatedReturnError(const Token *tok) " if (x)\n" " return a + 1,\n" " b++;\n" - "However it can be useful to use comma in macros. Cppcheck does not warn when such a " + "However it can be useful to use comma in macros. No warning is reported when such a " "macro is then used in a return statement, it is less likely such code is misunderstood.", CWE398, Certainty::normal); } diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index c7c6ea65dfc..74a017347d4 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -1252,8 +1252,8 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str if (!hasValidConfig && configurations.size() > 1 && mSettings.severity.isEnabled(Severity::information)) { std::string msg; - msg = "This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details."; - msg += "\nThis file is not analyzed. Cppcheck failed to extract a valid configuration. The tested configurations have these preprocessor errors:"; + msg = "This file is not analyzed. No working configuration could be extracted. Use -v for more details."; + msg += "\nThis file is not analyzed. No working configuration could be extracted. The tested configurations have these preprocessor errors:"; for (const std::string &s : configurationError) msg += '\n' + s; diff --git a/lib/importproject.cpp b/lib/importproject.cpp index acd7842224f..5a35e7d0a5e 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -1428,7 +1428,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti else if (strcmp(childname, Settings::SafeChecks::XmlExternalVariables) == 0) temp.safeChecks.externalVariables = true; else { - errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck project file"); + errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck GUI project file"); return false; } } @@ -1451,7 +1451,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti else if (strcmp(name, CppcheckXml::ProjectNameElementName) == 0) ; // no-op else { - errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck project file"); + errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck GUI project file"); return false; } } diff --git a/lib/mathlib.cpp b/lib/mathlib.cpp index f065d63a935..e74a4719339 100644 --- a/lib/mathlib.cpp +++ b/lib/mathlib.cpp @@ -1224,7 +1224,7 @@ std::string MathLib::calculate(const std::string &first, const std::string &seco return MathLib::toString(MathLib::toBigNumber(first) ^ MathLib::toBigNumber(second)) + intsuffix(first, second); default: - throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to Cppcheck developers."); + throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to the developers."); } } diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 123ef5ca898..61c82123319 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -959,7 +959,7 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line } ErrorMessage errmsg(std::move(locationList), mFile0, Severity::information, (headerType==SystemHeader) ? - "Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." : + "Include file: <" + header + "> not found. Please note: Standard library headers do not need to be provided to get proper results." : "Include file: \"" + header + "\" not found.", (headerType==SystemHeader) ? "missingIncludeSystem" : "missingInclude", Certainty::normal); diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index e7a096932cf..4229dc4666a 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -3152,7 +3152,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations( "templateRecursion", "TemplateSimplifier: max template recursion (" + std::to_string(mSettings.maxTemplateRecursion) - + ") reached for template '"+typeForNewName+"'. You might want to limit Cppcheck recursion.", + + ") reached for template '"+typeForNewName+"'. You might want to adjust the template recursion limit.", Certainty::normal); mErrorLogger.reportErr(errmsg); } diff --git a/lib/token.cpp b/lib/token.cpp index 5633f291083..c91d3b9656f 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -424,7 +424,7 @@ int multiComparePercent(const Token *tok, const char*& haystack, nonneg int vari return 1; } else { // %varid% if (varid == 0) { - throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers"); + throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to the developers"); } haystack += 6; diff --git a/test/cli/helloworld_test.py b/test/cli/helloworld_test.py index c4ffec69c9c..7b049108b5a 100644 --- a/test/cli/helloworld_test.py +++ b/test/cli/helloworld_test.py @@ -360,7 +360,7 @@ def test_missing_include_system(): # #11283 ] _, _, stderr = cppcheck(args, cwd=__script_dir) - assert stderr.replace('\\', '/') == 'helloworld/main.c:1:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n' + assert stderr.replace('\\', '/') == 'helloworld/main.c:1:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n' def test_sarif(): diff --git a/test/cli/other_test.py b/test/cli/other_test.py index c4ae2fab5cf..1335325525f 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -4018,7 +4018,7 @@ def test_no_valid_configuration(tmp_path): '{}:1:2: error: No header in #include [syntaxError]'.format(test_file), '{}:1:2: error: No header in #include [syntaxError]'.format(test_file), '{}:1:2: error: No header in #include [syntaxError]'.format(test_file), - '{}:0:0: information: This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details. [noValidConfiguration]'.format(test_file) + '{}:0:0: information: This file is not analyzed. No working configuration could be extracted. Use -v for more details. [noValidConfiguration]'.format(test_file) ] diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index a2f9526162c..7dabf330f25 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -167,7 +167,7 @@ class TestMathLib : public TestFixture { ASSERT_EQUALS("1", MathLib::calculate("0", "1", '^')); // Unknown action should throw exception - ASSERT_THROW_INTERNAL_EQUALS(MathLib::calculate("1","2",'j'),INTERNAL, "Unexpected action 'j' in MathLib::calculate(). Please report this to Cppcheck developers."); + ASSERT_THROW_INTERNAL_EQUALS(MathLib::calculate("1","2",'j'),INTERNAL, "Unexpected action 'j' in MathLib::calculate(). Please report this to the developers."); } void calculate1() const { diff --git a/test/testpreprocessor.cpp b/test/testpreprocessor.cpp index 66b3e24062f..106ca976574 100644 --- a/test/testpreprocessor.cpp +++ b/test/testpreprocessor.cpp @@ -2563,7 +2563,7 @@ class TestPreprocessor : public TestFixture { const char code[] = "#include "; (void)getcodeforcfg(settings, *this, code, "", "test.c"); - ASSERT_EQUALS("test.c:1:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str()); + ASSERT_EQUALS("test.c:1:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str()); } // test for missing system include @@ -2578,7 +2578,7 @@ class TestPreprocessor : public TestFixture { const char code[] = "#include "; (void)getcodeforcfg(settings, *this, code, "", "test.c"); - ASSERT_EQUALS("test.c:1:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str()); + ASSERT_EQUALS("test.c:1:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str()); } // test for existing system include in system include path @@ -2631,7 +2631,7 @@ class TestPreprocessor : public TestFixture { std::string code("#include <" + header + ">"); (void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c"); - ASSERT_EQUALS("test.c:1:2: information: Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str()); + ASSERT_EQUALS("test.c:1:2: information: Include file: <" + header + "> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str()); } // test for missing local and system include @@ -2654,8 +2654,8 @@ class TestPreprocessor : public TestFixture { (void)getcodeforcfg(settings, *this, code, "", "test.c"); ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n" - "test.c:2:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n" - "test.c:3:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str()); + "test.c:2:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n" + "test.c:3:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str()); } void testMissingIncludeCheckConfig() { @@ -2691,11 +2691,11 @@ class TestPreprocessor : public TestFixture { (void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c"); ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n" - "test.c:2:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n" - "test.c:3:2: information: Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n" + "test.c:2:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n" + "test.c:3:2: information: Include file: not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n" "test.c:6:2: information: Include file: \"header4.h\" not found. [missingInclude]\n" "test.c:9:2: information: Include file: \"" + missing3 + "\" not found. [missingInclude]\n" - "test.c:11:2: information: Include file: <" + missing4 + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str()); + "test.c:11:2: information: Include file: <" + missing4 + "> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str()); } void hasInclude() { diff --git a/test/testtoken.cpp b/test/testtoken.cpp index 1a94e092ac9..8042f235282 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -705,7 +705,7 @@ class TestToken : public TestFixture { ASSERT(var.tokenize("int a ; int b ;")); // Varid == 0 should throw exception - ASSERT_THROW_INTERNAL_EQUALS((void)Token::Match(var.tokens(), "%type% %varid% ; %type% %name%", 0),INTERNAL,"Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers"); + ASSERT_THROW_INTERNAL_EQUALS((void)Token::Match(var.tokens(), "%type% %varid% ; %type% %name%", 0),INTERNAL,"Internal error. Token::Match called with varid 0. Please report this to the developers"); ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %varid% ; %type% %name%", 1)); ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %name% ; %type% %varid%", 2));