-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1581 from smoe/CI_cppcheck_idea
Idea to integrate cppcheck
- Loading branch information
Showing
35 changed files
with
183 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash -e | ||
|
||
if ! command -v cppcheck; then | ||
echo "E: Please install the program 'cppcheck' prior to executing this script." | ||
exit 1 | ||
fi | ||
|
||
nproc=2 | ||
if command -v nproc; then | ||
nproc=$(nproc) | ||
fi | ||
|
||
# *** C dominated folder *** | ||
echo -n "I (1/4): checking HAL folders with C code only from dir "; pwd | ||
for d in src/hal/classicladder src/hal/components src/hal/drivers \ | ||
src/hal/user_comps $(find src/hal/user_comps/ -type d src/hal/utils) | ||
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++ dominated folder *** | ||
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 folder *** | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash -e | ||
|
||
if ! command -v shellcheck > /dev/null; then | ||
echo "E: Please install the program 'shellcheck' prior to executing this script." | ||
exit 1 | ||
fi | ||
|
||
echo Shellcheck | ||
find . -name "*.sh" -exec shellcheck {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
rs274 -p ${LIBDIR}/linuxcnc/canterp.so -g canon | awk '{$1=""; print}' | ||
rs274 -p "${LIBDIR}"/linuxcnc/canterp.so -g canon | awk '{$1=""; print}' | ||
exit ${PIPESTATUS[0]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
tests/trajectory-planner/circular-arcs/configs/add_hal_symlinks.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
ln -sf ../../../../configs/sim/core_sim.hal | ||
ln -sf ../../../../configs/sim/axis_manualtoolchange.hal | ||
ln -sf ../../../../configs/sim/sim_spindle_encoder.hal | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
ln -sf ../../../../configs/sim/core_sim.hal . | ||
ln -sf ../../../../configs/sim/axis_manualtoolchange.hal . | ||
ln -sf ../../../../configs/sim/sim_spindle_encoder.hal . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.