Update RadioLib
This commit is contained in:
parent
a8257c0cb2
commit
16bc3e2b42
46 changed files with 1102 additions and 97 deletions
27
lib/RadioLib/extras/cppcheck/cppcheck.sh
Normal file
27
lib/RadioLib/extras/cppcheck/cppcheck.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#! /bin/bash
|
||||
|
||||
file=cppcheck.txt
|
||||
cppcheck --version
|
||||
cppcheck src --enable=all \
|
||||
--force \
|
||||
--inline-suppr \
|
||||
--suppress=ConfigurationNotChecked \
|
||||
--suppress=unusedFunction \
|
||||
--suppress=missingIncludeSystem \
|
||||
--suppress=missingInclude \
|
||||
--quiet >> $file 2>&1
|
||||
echo "Cppcheck finished with exit code $?"
|
||||
|
||||
error=$(grep ": error:" $file | wc -l)
|
||||
warning=$(grep ": warning:" $file | wc -l)
|
||||
style=$(grep ": style:" $file | wc -l)
|
||||
performance=$(grep ": performance:" $file | wc -l)
|
||||
echo "found $error erros, $warning warnings, $style style and $performance performance issues"
|
||||
if [ $error -gt "0" ] || [ $warning -gt "0" ] || [ $style -gt "0" ] || [ $performance -gt "0" ]
|
||||
then
|
||||
cat $file
|
||||
exitcode=1
|
||||
fi
|
||||
|
||||
rm $file
|
||||
exit $exitcode
|
||||
Loading…
Add table
Add a link
Reference in a new issue