From fdf646422ae47e54cd1b9b5ffb4d4aa62055da7a Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 30 Nov 2016 13:31:07 +0300 Subject: [PATCH] Add script for checking coding style during Jenkins build procedure --- CPPLINT.cfg | 3 +-- checkCodingStyle.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 checkCodingStyle.sh diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 2905e7513..4eaf07162 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -1,7 +1,6 @@ set noparent linelength=100 -filter=-,+whitespace/line_length -exclude_files=.*XAO/.* +filter=-,+whitespace/line_length,+whitespace/end_of_line root=src # whitespace/line_length diff --git a/checkCodingStyle.sh b/checkCodingStyle.sh new file mode 100755 index 000000000..3bd0a414d --- /dev/null +++ b/checkCodingStyle.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +source env.sh + +CPPLINT_ARGS="" +CPPLINT_ARGS="${CPPLINT_ARGS} --verbose=0" +CPPLINT_ARGS="${CPPLINT_ARGS} --recursive" +CPPLINT_ARGS="${CPPLINT_ARGS} --counting=detailed" +CPPLINT_ARGS="${CPPLINT_ARGS} --extensions=h,cpp" +CPPLINT_ARGS="${CPPLINT_ARGS} --exclude=src/XAO/* --exclude=src/XAO/tests/*" +CPPLINT_ARGS="${CPPLINT_ARGS} --output=vs7" + +! cpplint.py ${CPPLINT_ARGS} . 2>&1 | grep -v Done -- 2.39.2