From 5a65cfd30e571bc5c24e2333e256f2a4b630f8cb Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Fri, 10 Aug 2018 14:10:08 +0100 Subject: COMPMID-1478: Fixed Doxygen comments + minor fixes - Allow check_bad_style.sh to only run on some of the files - Pass missing lws_hint() in CLNormalizationLayerKernel Change-Id: I2cf44f82f7ba6c8dc8d40691aeec7c6c3de385b5 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/143628 Reviewed-by: Michele DiGiorgio Reviewed-by: Gian Marco Iodice Tested-by: Jenkins --- scripts/check_bad_style.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/check_bad_style.sh b/scripts/check_bad_style.sh index 292cf518cd..b3e0b39be5 100755 --- a/scripts/check_bad_style.sh +++ b/scripts/check_bad_style.sh @@ -2,9 +2,18 @@ set -e -DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils ./support" +ALL_DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils ./support" -grep -HrnP --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "/\*\*$" $DIRECTORIES | tee bad_style.log +#If no arguments were passed: default to check all the folders: +if [ ! -n "$1" ] +then + FILES=$ALL_DIRECTORIES +else + #else only check the files that were passed on the command line: + FILES=$@ +fi + +grep -HrnP --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "/\*\*$" $FILES | tee bad_style.log if (( `cat bad_style.log | wc -l` > 0 )) then echo "" @@ -12,7 +21,7 @@ then exit -1 fi -grep -Hnr --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm --exclude=Doxyfile "@brief" $DIRECTORIES | tee bad_style.log +grep -Hnr --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm --exclude=Doxyfile "@brief" $FILES | tee bad_style.log if (( `cat bad_style.log | wc -l` > 0 )) then echo "" @@ -20,7 +29,7 @@ then exit -1 fi -grep -HnRE --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "\buint " --exclude-dir=cl_kernels --exclude-dir=cs_shaders $DIRECTORIES | tee bad_style.log +grep -HnRE --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "\buint " --exclude-dir=cl_kernels --exclude-dir=cs_shaders $FILES | tee bad_style.log if [[ $(cat bad_style.log | wc -l) > 0 ]] then echo "" @@ -28,7 +37,7 @@ then exit -1 fi -grep -HnR --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "float32_t" $DIRECTORIES | tee bad_style.log +grep -HnR --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "float32_t" $FILES | tee bad_style.log if [[ $(cat bad_style.log | wc -l) > 0 ]] then echo "" @@ -36,7 +45,7 @@ then exit -1 fi -grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "arm[_ ]\?cv" $DIRECTORIES | tee bad_style.log +grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "arm[_ ]\?cv" $FILES | tee bad_style.log if [[ $(cat bad_style.log | wc -l) > 0 ]] then echo "" @@ -44,7 +53,7 @@ then exit -1 fi -grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#.*if.*defined[^(]" $DIRECTORIES | tee bad_style.log +grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#.*if.*defined[^(]" $FILES | tee bad_style.log if [[ $(cat bad_style.log | wc -l) > 0 ]] then echo "" @@ -52,7 +61,7 @@ then exit -1 fi -grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#else$\|#endif$" $DIRECTORIES | tee bad_style.log +grep -Hnir --exclude-dir=assembly --exclude-dir=convolution --exclude-dir=arm_gemm "#else$\|#endif$" $FILES | tee bad_style.log if [[ $(cat bad_style.log | wc -l) > 0 ]] then echo "" @@ -69,7 +78,7 @@ then fi spdx_missing=0 -for f in $(find $DIRECTORIES -type f) +for f in $(find $FILES -type f) do if [[ $(grep SPDX $f | wc -l) == 0 ]] then -- cgit v1.2.1