Update static analysis - #11342
Conversation
maloel
commented
Jan 22, 2023
- parse the cppcheck log to show a summary
- store on git the golden log
- change static_analysis to actually show diffs
- remove the golden error count from static analysis -- it does this automatically from the golden log
- fail even if same # of errors, if there are diffs
(cherry picked from commit 1a959da)
| ERROR_COUNT=$(grep cppcheck_run.log -e "severity=\"error\"" -c); | ||
| if [ $ERROR_COUNT -eq ${{env.CPPCHECK_EXPECTED_ERROR_COUNT}} ]; | ||
| ERROR_COUNT=$(grep cppcheck_run.log -e "severity=\"error\"" -c) | ||
| EXPECTED_ERROR_COUNT=$(grep .github/workflows/cppcheck_run.log -e "severity=\"error\"" -c) |
There was a problem hiding this comment.
Shouldn't expected be parsed from golden?
There was a problem hiding this comment.
Ahhh... I see that the file you saved is not named golden. Change it's name to something with "gold", or "expected" in it
There was a problem hiding this comment.
It's the name of the file that's the same as the artifact.
I needed the "golden" to distinguish the two generated "parsed" files, that's all.
There was a problem hiding this comment.
That way, you can simply copy the artifact on top of the original and not have to change any filenames etc.
|
|
||
| path: | | ||
| cppcheck_run.log | ||
| cppcheck_run.parsed.log |
There was a problem hiding this comment.
Is the parsed log supposed to be uploaded? I did not see it saved in your last run GH actions.
I don't think that we do need to save it, we can always run the script to parse cppcheck_run.log if needed.
There was a problem hiding this comment.
Right. But it's uploaded because it doesn't cost us anything and it makes it easier to look at without knowing how to run the script.