Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CppCheckExecutor: do not modify settings after they were passed to CppCheck #5697

Merged
merged 1 commit into from
Nov 25, 2023

Conversation

firewave
Copy link
Collaborator

No description provided.

@@ -230,9 +233,10 @@ bool CppCheckExecutor::reportSuppressions(const Settings &settings, bool unusedF
/*
* That is a method which gets called from check_wrapper
* */
int CppCheckExecutor::check_internal(CppCheck& cppcheck)
int CppCheckExecutor::check_internal(CppCheck& cppcheck) const
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We did not detect this since the function body contains preprocessor usage.

@@ -183,10 +183,13 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
return EXIT_SUCCESS;
}

settings.loadSummaries();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No need to check settings.buildDir before calling this since it will do that by itself.

@firewave
Copy link
Collaborator Author

This is a change towards #4964 as well as making the settings immutable after they have been created.

@firewave firewave marked this pull request as draft November 23, 2023 18:46
@firewave firewave marked this pull request as ready for review November 23, 2023 18:48
@firewave firewave merged commit 1d3f9be into danmar:main Nov 25, 2023
68 checks passed
@firewave firewave deleted the cmd-x2 branch November 25, 2023 21:07
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