-
Notifications
You must be signed in to change notification settings - Fork 11
34 lines (29 loc) · 1.14 KB
/
firmware-lint.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
name: Firmware Lint
on: [push, pull_request]
jobs:
cpp-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: action-cpp-lint
uses: CyberZHG/[email protected]
with:
args: "--recursive ./"
cppcheck:
runs-on: ubuntu-18.04
steps:
- name: install cppcheck
run: |
sed 's/bionic/focal/g' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/focal.list
sudo apt-get update
echo "Package: cppcheck" | sudo tee /etc/apt/preferences.d/cppcheck
echo "Pin: release n=focal" | sudo tee -a /etc/apt/preferences.d/cppcheck
echo "Pin-Priority: 990" | sudo tee -a /etc/apt/preferences.d/cppcheck
sudo apt-get install -y cppcheck
- uses: actions/checkout@v2
- name: run cppcheck
run: |
cppcheck --version
cppcheck --error-exitcode=1 --enable=all --inline-suppr -I ./includes ./srcs
cppcheck --error-exitcode=1 --addon=cert --inline-suppr -I ./includes ./srcs
cppcheck --error-exitcode=1 --addon=misra --inline-suppr --suppressions-list=./cppcheck/misra-suppr.txt -I ./includes ./srcs