Skip to content

Commit 72883d3

Browse files
committed
re-worded some messages and avoid using product name [skip ci]
1 parent 46c8934 commit 72883d3

10 files changed

Lines changed: 19 additions & 19 deletions

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ void CheckOther::commaSeparatedReturnError(const Token *tok)
15061506
" if (x)\n"
15071507
" return a + 1,\n"
15081508
" b++;\n"
1509-
"However it can be useful to use comma in macros. Cppcheck does not warn when such a "
1509+
"However it can be useful to use comma in macros. No warning is reported when such a "
15101510
"macro is then used in a return statement, it is less likely such code is misunderstood.", CWE398, Certainty::normal);
15111511
}
15121512

lib/cppcheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,8 +1251,8 @@ unsigned int CppCheck::checkInternal(const FileWithDetails& file, const std::str
12511251

12521252
if (!hasValidConfig && configurations.size() > 1 && mSettings.severity.isEnabled(Severity::information)) {
12531253
std::string msg;
1254-
msg = "This file is not analyzed. Cppcheck failed to extract a valid configuration. Use -v for more details.";
1255-
msg += "\nThis file is not analyzed. Cppcheck failed to extract a valid configuration. The tested configurations have these preprocessor errors:";
1254+
msg = "This file is not analyzed. No working configuration could be extracted. Use -v for more details.";
1255+
msg += "\nThis file is not analyzed. No working configuration could be extracted. The tested configurations have these preprocessor errors:";
12561256
for (const std::string &s : configurationError)
12571257
msg += '\n' + s;
12581258

lib/importproject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti
14281428
else if (strcmp(childname, Settings::SafeChecks::XmlExternalVariables) == 0)
14291429
temp.safeChecks.externalVariables = true;
14301430
else {
1431-
errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck project file");
1431+
errors.emplace_back("Unknown '" + std::string(Settings::SafeChecks::XmlRootName) + "' element '" + childname + "' in Cppcheck GUI project file");
14321432
return false;
14331433
}
14341434
}
@@ -1451,7 +1451,7 @@ bool ImportProject::importCppcheckGuiProject(std::istream &istr, Settings &setti
14511451
else if (strcmp(name, CppcheckXml::ProjectNameElementName) == 0)
14521452
; // no-op
14531453
else {
1454-
errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck project file");
1454+
errors.emplace_back("Unknown element '" + std::string(name) + "' in Cppcheck GUI project file");
14551455
return false;
14561456
}
14571457
}

lib/mathlib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ std::string MathLib::calculate(const std::string &first, const std::string &seco
12241224
return MathLib::toString(MathLib::toBigNumber(first) ^ MathLib::toBigNumber(second)) + intsuffix(first, second);
12251225

12261226
default:
1227-
throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to Cppcheck developers.");
1227+
throw InternalError(nullptr, std::string("Unexpected action '") + action + "' in MathLib::calculate(). Please report this to the developers.");
12281228
}
12291229
}
12301230

lib/preprocessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ void Preprocessor::missingInclude(const std::string &filename, unsigned int line
959959
}
960960
ErrorMessage errmsg(std::move(locationList), mFile0, Severity::information,
961961
(headerType==SystemHeader) ?
962-
"Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results." :
962+
"Include file: <" + header + "> not found. Please note: Standard library headers do not need to be provided to get proper results." :
963963
"Include file: \"" + header + "\" not found.",
964964
(headerType==SystemHeader) ? "missingIncludeSystem" : "missingInclude",
965965
Certainty::normal);

lib/templatesimplifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3147,7 +3147,7 @@ bool TemplateSimplifier::simplifyTemplateInstantiations(
31473147
"templateRecursion",
31483148
"TemplateSimplifier: max template recursion ("
31493149
+ std::to_string(mSettings.maxTemplateRecursion)
3150-
+ ") reached for template '"+typeForNewName+"'. You might want to limit Cppcheck recursion.",
3150+
+ ") reached for template '"+typeForNewName+"'. You might want to adjust the template recursion limit.",
31513151
Certainty::normal);
31523152
mErrorLogger.reportErr(errmsg);
31533153
}

lib/token.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ int multiComparePercent(const Token *tok, const char*& haystack, nonneg int vari
424424
return 1;
425425
} else { // %varid%
426426
if (varid == 0) {
427-
throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to Cppcheck developers");
427+
throw InternalError(tok, "Internal error. Token::Match called with varid 0. Please report this to the developers");
428428
}
429429

430430
haystack += 6;

test/testmathlib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class TestMathLib : public TestFixture {
167167
ASSERT_EQUALS("1", MathLib::calculate("0", "1", '^'));
168168

169169
// Unknown action should throw exception
170-
ASSERT_THROW_INTERNAL_EQUALS(MathLib::calculate("1","2",'j'),INTERNAL, "Unexpected action 'j' in MathLib::calculate(). Please report this to Cppcheck developers.");
170+
ASSERT_THROW_INTERNAL_EQUALS(MathLib::calculate("1","2",'j'),INTERNAL, "Unexpected action 'j' in MathLib::calculate(). Please report this to the developers.");
171171
}
172172

173173
void calculate1() const {

test/testpreprocessor.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,7 +2561,7 @@ class TestPreprocessor : public TestFixture {
25612561
const char code[] = "#include <header.h>";
25622562
(void)getcodeforcfg(settings, *this, code, "", "test.c");
25632563

2564-
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2564+
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str());
25652565
}
25662566

25672567
// test for missing system include
@@ -2576,7 +2576,7 @@ class TestPreprocessor : public TestFixture {
25762576
const char code[] = "#include <header.h>";
25772577
(void)getcodeforcfg(settings, *this, code, "", "test.c");
25782578

2579-
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2579+
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str());
25802580
}
25812581

25822582
// test for existing system include in system include path
@@ -2629,7 +2629,7 @@ class TestPreprocessor : public TestFixture {
26292629
std::string code("#include <" + header + ">");
26302630
(void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c");
26312631

2632-
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());
2632+
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());
26332633
}
26342634

26352635
// test for missing local and system include
@@ -2652,8 +2652,8 @@ class TestPreprocessor : public TestFixture {
26522652
(void)getcodeforcfg(settings, *this, code, "", "test.c");
26532653

26542654
ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2655-
"test.c:2:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2656-
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2655+
"test.c:2:2: information: Include file: <header.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n"
2656+
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n", errout_str());
26572657
}
26582658

26592659
void testMissingIncludeCheckConfig() {
@@ -2689,11 +2689,11 @@ class TestPreprocessor : public TestFixture {
26892689
(void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c");
26902690

26912691
ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2692-
"test.c:2:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2693-
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2692+
"test.c:2:2: information: Include file: <header.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n"
2693+
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Standard library headers do not need to be provided to get proper results. [missingIncludeSystem]\n"
26942694
"test.c:6:2: information: Include file: \"header4.h\" not found. [missingInclude]\n"
26952695
"test.c:9:2: information: Include file: \"" + missing3 + "\" not found. [missingInclude]\n"
2696-
"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());
2696+
"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());
26972697
}
26982698

26992699
void hasInclude() {

test/testtoken.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ class TestToken : public TestFixture {
705705
ASSERT(var.tokenize("int a ; int b ;"));
706706

707707
// Varid == 0 should throw exception
708-
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");
708+
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");
709709

710710
ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %varid% ; %type% %name%", 1));
711711
ASSERT_EQUALS(true, Token::Match(var.tokens(), "%type% %name% ; %type% %varid%", 2));

0 commit comments

Comments
 (0)