Fixing scripts and configuration of cppcheck and vera++, adding some vera++ rules.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-04-29 19:21:15 +03:00
parent 1669c3ed3d
commit ef461e383a
8 changed files with 427 additions and 22 deletions
+9 -18
View File
@@ -23,27 +23,18 @@ shift
TARGETS="$1"
shift
PARSE_ONLY_TESTING_PATHS="./tests/benchmarks/jerry"
FULL_TESTING_PATHS="./tests/jerry ./tests/jerry-test-suite/precommit_test_list"
VERA_DIRECTORIES_EXCLUDE_LIST="-path ./third-party -o -path tests"
VERA_CONFIGURATION_PATH="./tools/vera++"
VERA=`which vera++`
if [ -x "$VERA" ]
SOURCES_AND_HEADERS_LIST=`find . -type d \( $VERA_DIRECTORIES_EXCLUDE_LIST \) -prune -or -name "*.c" -or -name "*.cpp" -or -name "*.h"`
./tools/vera++/vera.sh -r $VERA_CONFIGURATION_PATH -p jerry $SOURCES_AND_HEADERS_LIST -e --no-duplicate
STATUS_CODE=$?
if [ $STATUS_CODE -ne 0 ]
then
VERA_DIRECTORIES_EXCLUDE_LIST="-path ./third-party -o -path tests"
VERA_SCRIPTS_PATH="./tools/vera++"
echo -e "\e[1;33m vera++ static checks failed. See output above for details. \e[0m\n"
SOURCES_AND_HEADERS_LIST=`find . -type d \( $VERA_DIRECTORIES_EXCLUDE_LIST \) -prune -or -name "*.c" -or -name "*.cpp" -or -name "*.h"`
vera++ -r $VERA_SCRIPTS_PATH -p jerry $SOURCES_AND_HEADERS_LIST -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"
exit $STATUS_CODE
fi
else
echo -e "\e[1;33m Warning: vera++ not installed, skipping corresponding static checks. \e[0m\n"
exit $STATUS_CODE
fi
echo -e "\nBuilding...\n\n"