Skip to content

Static analysis

Static analysis #10

name: Static Analysis
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake
pip install --upgrade pip
pip install codechecker
CodeChecker analyzers --details
- name: generate compile commands
run: bazel build //:iso14229 && bazel run //:lib_compile_commands
- name: Analyze with CodeChecker
run: |
CodeChecker analyze compile_commands.json --ignore .CodeChecker/skipfile.txt -o reports
- name: Print report summary
run: |
CodeChecker parse reports
continue-on-error: true
- name: Generate json report
run: |
CodeChecker parse reports --export json -o report.json
continue-on-error: true
- name: Annotate PR with CodeChecker issues
run: |
.CodeChecker/report_json_to_gh_annotations.sh report.json