Move cppcheck logic from Makefile and CMakeLists.txt to tools/check-cppcheck.sh
The legacy approach executed cppcheck for every build target, which resulted in a huge number of re-checks of the sources if more than one targets were built. The main reason behind that was to get the right macro-guarded code paths analyzed. However, cppcheck can analyze every configuration of the sources in one go. (The patch also contains some aesthetic changes around the way vera++ is called and how errors are reported.) JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
+3
-9
@@ -19,12 +19,6 @@ JERRY_CORE_FILES=`find ./jerry-core -name "*.c" -or -name "*.cpp" -or -name "*.h
|
||||
JERRY_LIBC_FILES=`find ./jerry-libc -name "*.c" -or -name "*.cpp" -or -name "*.h"`
|
||||
JERRY_MAIN_FILES=`find . -maxdepth 1 -name "*.c" -or -name "*.cpp" -or -name "*.h"`
|
||||
|
||||
vera++ -r tools/vera++ -p jerry $JERRY_CORE_FILES $JERRY_LIBC_FILES $JERRY_MAIN_FILES -e --no-duplicate
|
||||
STATUS_CODE=$?
|
||||
|
||||
if [ $STATUS_CODE -ne 0 ]
|
||||
then
|
||||
echo -e "\e[1;33m vera++ static checks failed. See output above for details. \e[0m\n"
|
||||
fi
|
||||
|
||||
exit $STATUS_CODE
|
||||
vera++ -r tools/vera++ -p jerry \
|
||||
-e --no-duplicate \
|
||||
$JERRY_CORE_FILES $JERRY_LIBC_FILES $JERRY_MAIN_FILES
|
||||
|
||||
Reference in New Issue
Block a user