aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlement Sekera <klement.sekera@gmail.com>2022-02-18 16:23:33 +0000
committerDave Wallace <dwallacelf@gmail.com>2022-03-22 01:34:57 +0000
commitb9ff03c805ead01101f214638873fcdcb3124a02 (patch)
tree2b1690fb6796fe4d8cc7240c77916f3285d42dba
parentb3fc65817ef1aec3bf5f51bc00633e03428e64fc (diff)
build: fix clang-format-diff[.py] detection
Fix clang-format-diff autodetection error in case of non-standard clang-format-diff path. Also allow finding clang-format-diff.py in non-standard location. Type: improvement Signed-off-by: Klement Sekera <klement.sekera@gmail.com> Change-Id: I3cb76aa152a8245e62db62f5fe2ba96b1ff86428
-rwxr-xr-xextras/scripts/checkstyle.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/extras/scripts/checkstyle.sh b/extras/scripts/checkstyle.sh
index 4dcf77874d3..f26dc234690 100755
--- a/extras/scripts/checkstyle.sh
+++ b/extras/scripts/checkstyle.sh
@@ -60,9 +60,12 @@ fi
if command -v clang-format-diff${SUFFIX} &> /dev/null;
then
CLANG_FORMAT_DIFF=clang-format-diff${SUFFIX}
+elif command -v clang-format-diff.py &> /dev/null;
+then
+ CLANG_FORMAT_DIFF=clang-format-diff.py
elif command -v clang-format-diff &> /dev/null;
then
- CLANG_FORMAT=clang-format-diff
+ CLANG_FORMAT_DIFF=clang-format-diff
elif [ ! -f $CLANG_FORMAT_DIFF ] ;
then
echo "*******************************************************************"