Skip to content

Commit

Permalink
Fix #12624 (The misra-config should not be a critical error)
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Apr 18, 2024
1 parent 8c78869 commit 8d39898
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/errorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const std::set<std::string> ErrorLogger::mCriticalErrorIds{
"internalAstError",
"instantiationError",
"internalError",
"misra-config",
"premium-internalError",
"premium-invalidArgument",
"premium-invalidLicense",
Expand Down
7 changes: 7 additions & 0 deletions test/testerrorlogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class TestErrorLogger : public TestFixture {

TEST_CASE(substituteTemplateFormatStatic);
TEST_CASE(substituteTemplateLocationStatic);

TEST_CASE(isCriticalErrorId);
}

void TestPatternSearchReplace(const std::string& idPlaceholder, const std::string& id) const {
Expand Down Expand Up @@ -519,6 +521,11 @@ class TestErrorLogger : public TestFixture {
ASSERT_EQUALS("{", s);
}
}

void isCriticalErrorId() {
// It does not abort all the analysis of the file. Like "missingInclude" there can be false negatives.
ASSERT_EQUALS(false, ErrorLogger::isCriticalErrorId("misra-config"));
}
};

REGISTER_TEST(TestErrorLogger)

0 comments on commit 8d39898

Please sign in to comment.