-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (41 loc) · 1.35 KB
/
sca_misra.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: "SCA: MISRA-C-2012"
# TODO: run only on successfull builds
on:
workflow_dispatch:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
env:
BUILD_TYPE: Release
jobs:
sca-misra:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install cppcheck
uses: awalsh128/[email protected]
with:
packages: cppcheck
version: 1.0
- name: Build project
uses: ./.github/workflows/build_helper
with:
build_type: ${{env.BUILD_TYPE}}
src_dir: ${{github.workspace}}
build_dir: ${{github.workspace}}/build
platform: 'posix'
build_tests: 'OFF'
build_examples: 'ON'
- name: Run MISRA check
run: |
cppcheck --addon=${{github.workspace}}/scripts/cppcheck/misra.json \
--enable=warning,performance,portability,information \
--inline-suppr \
--xml \
--suppressions-list=${{github.workspace}}/scripts/cppcheck/cppcheck_suppress.txt \
--project=${{github.workspace}}/build/compile_commands.json \
-DSTL_AVAILABLE -D__GNU__=1 -D__LITTLE_ENDIAN__ -D__GNUC__ 2> ${{github.workspace}}/sca_misra.txt
- name: Validate cppcheck report
run: |
${{github.workspace}}/scripts/cppcheck/cppcheck_review.py ${{github.workspace}}/sca_misra.txt