Skip to content

Commit

Permalink
add MISRA rule checking to static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
driftregion committed Jan 31, 2025
1 parent 0f0ea69 commit bb53da4
Show file tree
Hide file tree
Showing 8 changed files with 5,024 additions and 527 deletions.
3 changes: 1 addition & 2 deletions .CodeChecker/post_to_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ def main(report_path):
sys.exit(1)

print(f"Updated check run with {len(chunk)} annotations (total {index}/{all_annotations}). Last chunk: {is_last_chunk}")
print(update_payload)

print("All annotations posted successfully.")

if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python check_run.py <report.json>")
print("Usage: python post_to_github.py <report.json>")
sys.exit(1)
main(sys.argv[1])
8 changes: 8 additions & 0 deletions .CodeChecker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# --enable sensitive \
# --analyzers cppcheck \
CodeChecker analyze compile_commands.json \
--ignore .CodeChecker/skipfile.txt \
--analyzer-config cppcheck:addons=.cppcheck/misra.json \
-o reports
2 changes: 1 addition & 1 deletion .cppcheck/misra.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"script": "misra.py",
"args": [
"--rule-texts=misra_c_2023__headlines_for_cppcheck.txt"
"--rule-texts=.cppcheck/misra_c_2023__headlines_for_cppcheck.txt"
]
}
Loading

0 comments on commit bb53da4

Please sign in to comment.