Skip to content

Commit

Permalink
add statistics for cppcheck-all
Browse files Browse the repository at this point in the history
Signed-off-by: kminoda <[email protected]>
  • Loading branch information
kminoda committed Jun 4, 2024
1 parent 9231644 commit 4f10212
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/cppcheck-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@ jobs:
- name: Run Cppcheck on all files
run: |
cppcheck --enable=all --inconclusive --check-level=exhaustive --xml . 2> cppcheck-report.xml
shell: bash
shell: bash

- name: Count errors by error ID and severity
run: |
#!/bin/bash
temp_file=$(mktemp)
grep -oP '(?<=id=")[^"]+" severity="[^"]+' cppcheck-report.xml | sed 's/" severity="/,/g' > "$temp_file"
echo "Error counts by error ID and severity:"
sort "$temp_file" | uniq -c
rm "$temp_file"
shell: bash

0 comments on commit 4f10212

Please sign in to comment.