Skip to content

Commit

Permalink
CI: Added shellcheck, explicit continue upon failure
Browse files Browse the repository at this point in the history
  • Loading branch information
smoe committed Oct 19, 2024
1 parent d0c04b3 commit 1710aa7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,28 @@ jobs:
run: |
set -x
git fetch --recurse-submodules=no https://github.com/linuxcnc/linuxcnc refs/tags/*:refs/tags/*
sudo apt-get -y install cppcheck
sudo apt-get -y install cppcheck shellcheck
- name: C
continue-on-error: true
run: |
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
- name: C++
continue-on-error: true
run: |
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
- name: C and C++ in same dir
continue-on-error: true
run: |
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
- name: Shellcheck
continue-on-error: true
run: |
find . -name "*.sh" | xargs -r -L 1 shellcheck

0 comments on commit 1710aa7

Please sign in to comment.