Skip to content

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

Merged
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:cmd-x2
Nov 25, 2023
Merged

CppCheckExecutor: do not modify settings after they were passed to CppCheck#5697
firewave merged 1 commit intocppcheck-opensource:mainfrom
firewave:cmd-x2

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread cli/cppcheckexecutor.cpp
* 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
Copy Markdown
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.

Comment thread cli/cppcheckexecutor.cpp
return EXIT_SUCCESS;
}

settings.loadSummaries();
Copy link
Copy Markdown
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
Copy Markdown
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 cppcheck-opensource:main Nov 25, 2023
@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