Skip to content

Fix #13889 (cached misra results are shown after removing --premium=misra-c-2012 option)#7594

Merged
danmar merged 10 commits intocppcheck-opensource:mainfrom
glankk:13889
Jun 17, 2025
Merged

Fix #13889 (cached misra results are shown after removing --premium=misra-c-2012 option)#7594
danmar merged 10 commits intocppcheck-opensource:mainfrom
glankk:13889

Conversation

@glankk
Copy link
Copy Markdown
Collaborator

@glankk glankk commented Jun 13, 2025

Include addon info and premium args in analyzerinfo hash function, fixes #13889.

Copy link
Copy Markdown
Collaborator

@danmar danmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fix looks good to me. but please try to test it somehow.

Comment thread test/testcppcheck.cpp Outdated

settings.premiumArgs = "misra-c-2012";
CppCheck check(settings, supprs, errorLogger, false, {});
size_t hash1 = check.calculateHash(preprocessor, tokens);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use const when possible.

@danmar danmar merged commit a9f76b7 into cppcheck-opensource:main Jun 17, 2025
53 checks passed
@glankk glankk deleted the 13889 branch June 17, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants