Skip to content

Commit

Permalink
Idea to integrate cppcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
smoe committed Feb 8, 2022
1 parent aa77355 commit b725a83
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,37 @@ jobs:
sudo apt-get install ../*.deb
./scripts/runtests -p tests/
lintian --info --display-info --pedantic --display-experimental ../*.deb
cppcheck:
runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Perform Source Code checks that were successful in the past
run: |
set -x
git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/*
sudo apt-get -y install cppcheck
# C
echo -n "I (1/4): checking HAL folders with C code only from dir "; pwd
for d in src/hal/classicladder src/hal/components; do (cd $d && cppcheck -j $(nproc) --language=c --force *.h *.c); done
echo -n "I (2/4): checking EMC folders with C code only from dir "; pwd
for d in src/emc/motion-logger src/emc/tp; do (cd $d && cppcheck -j $(nproc) --language=c --force *.h *.c); done
# problematic: src/hal/drivers src/hal/user_comps src/hal/utits
# C++
echo -n "I (3/4): checking EMC folders with C++ code only from dir "; pwd
for d in src/emc/canterp src/emc/ini src/emc/pythonplugin src/emc/tooldata; do (cd $d && cppcheck -j $(nproc) --language=c++ --force *.hh *.cc); done
# problematic iotask src/emc/sai src/emc/task
# C and C++ in same dir
echo -n "I (4/4): checking EMC folders with both C and C++ code from dir "; pwd
for d in src/emc/rs274ngc; do (cd $d && cppcheck -j $(nproc) --language=c --force *.h *.c && cppcheck -j $(nproc) --language=c++ --force *.hh *.cc); done
# problematic src/emc/kinematics src/emc/nml_intf src/emc/usr_intf

0 comments on commit b725a83

Please sign in to comment.