mirror of https://github.com/commaai/panda.git
merge misra and cppcheck runs (#1790)
This commit is contained in:
parent
2a0536c631
commit
9270848da8
|
@ -9,15 +9,9 @@ NC='\033[0m'
|
|||
|
||||
GCC_INC="$(arm-none-eabi-gcc -print-file-name=include)"
|
||||
: "${CPPCHECK_DIR:=$DIR/cppcheck/}"
|
||||
CPPCHECK="$CPPCHECK_DIR/cppcheck --dump --enable=all --force --inline-suppr -I $PANDA_DIR/board/ -I $GCC_INC \
|
||||
CPPCHECK="$CPPCHECK_DIR/cppcheck --enable=all --force --inline-suppr -I $PANDA_DIR/board/ -I $GCC_INC \
|
||||
--suppressions-list=$DIR/suppressions.txt --suppress=*:*inc/* \
|
||||
--suppress=*:*include/* --error-exitcode=2"
|
||||
|
||||
RULES="$DIR/MISRA_C_2012.txt"
|
||||
MISRA="python $CPPCHECK_DIR/addons/misra.py"
|
||||
if [ -f "$RULES" ]; then
|
||||
MISRA="$MISRA --rule-texts $RULES"
|
||||
fi
|
||||
--suppress=*:*include/* --error-exitcode=2 --addon=misra"
|
||||
|
||||
# install cppcheck if missing
|
||||
if [ ! -d $CPPCHECK_DIR ]; then
|
||||
|
@ -38,14 +32,11 @@ scons -j8
|
|||
|
||||
printf "\n${GREEN}** PANDA F4 CODE **${NC}\n"
|
||||
$CPPCHECK -DCAN3 -DPANDA -DSTM32F4 -UPEDAL -DUID_BASE board/main.c
|
||||
$MISRA board/main.c.dump
|
||||
|
||||
printf "\n${GREEN}** PANDA H7 CODE **${NC}\n"
|
||||
$CPPCHECK -DCAN3 -DPANDA -DSTM32H7 -UPEDAL -DUID_BASE board/main.c
|
||||
$MISRA board/main.c.dump
|
||||
|
||||
printf "\n${GREEN}** PEDAL CODE **${NC}\n"
|
||||
$CPPCHECK -UCAN3 -UPANDA -DSTM32F2 -DPEDAL -UUID_BASE board/pedal/main.c
|
||||
$MISRA board/pedal/main.c.dump
|
||||
|
||||
printf "\n${GREEN}Success!${NC} took $SECONDS seconds\n"
|
||||
|
|
Loading…
Reference in New Issue