[analyzer] Cppcheck support#3680
Merged
whisperity merged 21 commits intoEricsson:masterfrom Aug 19, 2022
Merged
Conversation
Contributor
Author
|
Closes #484 |
a1203fa to
91c14aa
Compare
whisperity
suggested changes
Aug 4, 2022
This commit adds support for the Cppcheck analyzer. The following two commits are also squashed into this: * [test] Add new test cases for Cppcheck support * [analyzer] Check version compatibility This commit is the resurrection of works made by Márton Csordás. The original pull request Ericsson#2290 had three more refactoring related change sets which were omitted in this. Some changes were added in compared to the original commits: * The Cppcheck report converter is used to get the results in the result_handler. * The hash calculation logic has been uplifted to the latest one. * Some small small compatibility changes were added because of the changes in the code base. Co-authored-by: bruntib <bruntib@users.noreply.github.com> Co-authored-by: vodorok <vodorok@gmail.com>
This patch is a work in progress, there are debug prints all over the place inside Codechecker, treat it accordingly. Will be amended, and split up, when I am back from vacation. Cppcheck now works in a raw directory instead of directly into the workspace folder. Exponential explosion of reports in plist files are now fixed. Checker disable now works on native levels. The `--disable <cppcheck_check>` now properly translates to `--suppress <cppcheck_check> in the cppcheck invocation. The current run configuration of cppcheck is `--enable=all`. Added two new input paramaters: With `cppcheck-addons` extra cppcheck checkers can be specified. With `cppcheck-libraries` the cppcheck library definitions can be added. Cppcheck reports have to be "fixed" for Codechecker to be able to properly interpret them. The actual error message must be added to any multistep report as a last bug path event. Cppcheck checkers are prefixed with the `cppcheck-` prefix.
Member
|
you may consider adding this analyzer option to the cppcheck plugin |
whisperity
suggested changes
Aug 16, 2022
tools/report-converter/codechecker_report_converter/analyzers/cppcheck/analyzer_result.py
Outdated
Show resolved
Hide resolved
whisperity
suggested changes
Aug 19, 2022
Comment on lines
+155
to
+157
| output_dir = Path(result_handler.workspace, "cppcheck", | ||
| result_handler.buildaction_hash) | ||
| output_dir.mkdir(exist_ok=True) |
Contributor
There was a problem hiding this comment.
Use os.makedirs instead, so it creates the parent directories, and then the other call might truly be redundant.
d80db17 to
8a2810d
Compare
This was referenced Aug 19, 2022
bruntib
approved these changes
Aug 19, 2022
whisperity
reviewed
Aug 19, 2022
tools/report-converter/codechecker_report_converter/analyzers/cppcheck/analyzer_result.py
Outdated
Show resolved
Hide resolved
whisperity
approved these changes
Aug 19, 2022
Closed
|
🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds support for the Cppcheck analyzer.
The following two commits are also squashed into this:
This commit is the resurrection of works made by Márton Csordás.
The original pull request #2290 had three more refactoring related change
sets which were omitted in this. Some changes were added in compared to
the original commits:
result_handler.
changes in the code base.
Co-authored-by: bruntib bruntib@users.noreply.github.com
Co-authored-by: vodorok vodorok@gmail.com