aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/add_copyright.py2
-rwxr-xr-xscripts/check_bad_style.sh16
-rwxr-xr-xscripts/clang_tidy_rules.py6
-rwxr-xr-xscripts/fix_code_formatting.sh5
4 files changed, 19 insertions, 10 deletions
diff --git a/scripts/add_copyright.py b/scripts/add_copyright.py
index 0c5b8f00cf..a9d4929db8 100755
--- a/scripts/add_copyright.py
+++ b/scripts/add_copyright.py
@@ -71,7 +71,7 @@ for top in ['./arm_compute', './tests','./src','./examples','./utils/','./framew
content = fd.read()
_, extension = os.path.splitext(f)
- if extension in ['.cpp', '.h', '.inl', '.cl']:
+ if extension in ['.cpp', '.h', '.hpp', '.inl', '.cl']:
if not content.startswith('/*'):
add_cpp_copyright(path, content)
elif extension == '.py' or f in ['SConstruct', 'SConscript']:
diff --git a/scripts/check_bad_style.sh b/scripts/check_bad_style.sh
index 386824015f..ab2b1a016d 100755
--- a/scripts/check_bad_style.sh
+++ b/scripts/check_bad_style.sh
@@ -5,7 +5,7 @@ set -e
DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils ./support"
-grep -HrnP "/\*\*$" $DIRECTORIES | tee bad_style.log
+grep -HrnP --exclude-dir=assembly "/\*\*$" $DIRECTORIES | tee bad_style.log
if (( `cat bad_style.log | wc -l` > 0 ))
then
echo ""
@@ -13,7 +13,7 @@ then
exit -1
fi
-grep -Hnr --exclude=Doxyfile "@brief" $DIRECTORIES | tee bad_style.log
+grep -Hnr --exclude-dir=assembly --exclude=Doxyfile "@brief" $DIRECTORIES | tee bad_style.log
if (( `cat bad_style.log | wc -l` > 0 ))
then
echo ""
@@ -21,7 +21,7 @@ then
exit -1
fi
-grep -HnRE "\buint " --exclude-dir=cl_kernels $DIRECTORIES | tee bad_style.log
+grep -HnRE --exclude-dir=assembly "\buint " --exclude-dir=cl_kernels $DIRECTORIES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -29,7 +29,7 @@ then
exit -1
fi
-grep -HnR "float32_t" $DIRECTORIES | tee bad_style.log
+grep -HnR --exclude-dir=assembly "float32_t" $DIRECTORIES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -37,7 +37,7 @@ then
exit -1
fi
-grep -Hnir "arm[_ ]\?cv" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly "arm[_ ]\?cv" $DIRECTORIES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -45,7 +45,7 @@ then
exit -1
fi
-grep -Hnir "#.*defined[^(]" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly "#.*defined[^(]" $DIRECTORIES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -53,7 +53,7 @@ then
exit -1
fi
-grep -Hnir "#else$\|#endif$" $DIRECTORIES | tee bad_style.log
+grep -Hnir --exclude-dir=assembly "#else$\|#endif$" $DIRECTORIES | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
@@ -61,7 +61,7 @@ then
exit -1
fi
-grep -Hnir "ARM_COMPUTE_ENABLE_FP16" ./tests/validation/CL | tee bad_style.log
+grep -Hnir --exclude-dir=assembly "ARM_COMPUTE_ENABLE_FP16" ./tests/validation/CL | tee bad_style.log
if [[ $(cat bad_style.log | wc -l) > 0 ]]
then
echo ""
diff --git a/scripts/clang_tidy_rules.py b/scripts/clang_tidy_rules.py
index c3faf8736c..900413c90b 100755
--- a/scripts/clang_tidy_rules.py
+++ b/scripts/clang_tidy_rules.py
@@ -42,12 +42,16 @@ def filter_clang_tidy_lines( lines ):
for i in range(0, len(lines)):
line = lines[i]
+ if "/assembly/" in line:
+ continue
+
if "error:" in line:
if (("Utils.cpp" in line and "'arm_compute_version.embed' file not found" in line) or
("cl2.hpp" in line and "cast from pointer to smaller type 'cl_context_properties' (aka 'int') loses information" in line) or
("arm_fp16.h" in line) or
("omp.h" in line) or
- ("memory" in line and "cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information" in line) or
+ ("cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information" in line) or
+ ("cast from pointer to smaller type 'std::uintptr_t' (aka 'unsigned int') loses information" in line) or
("NEMath.inl" in line and "statement expression not allowed at file scope" in line) or
("Utils.h" in line and "no member named 'unmap' in 'arm_compute::Tensor'" in line) or
("Utils.h" in line and "no member named 'map' in 'arm_compute::Tensor'" in line) or
diff --git a/scripts/fix_code_formatting.sh b/scripts/fix_code_formatting.sh
index ccda38abab..a07d2615af 100755
--- a/scripts/fix_code_formatting.sh
+++ b/scripts/fix_code_formatting.sh
@@ -28,6 +28,11 @@ else
fi
for f in $files
do
+ if [[ $f == *"/assembly/"* ]]
+ then
+ continue
+ fi
+
sed -i 's/\t/ /g' $f
clang-format -i -style=file $f
astyle -n -q $ASTYLE_PARAMETERS $f