File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Checks : " -*,eigen-avoid-auto"
22CheckOptions :
3- - key: eigen-avoid-auto.AllowInRangeFor
4- value: "false"
5- - key: eigen-avoid-auto.OnlyExpressions
6- value: "false"
7- - key: eigen-avoid-auto.BanDecltypeAuto
8- value: "true"
3+ - key : eigen-avoid-auto.AllowInRangeFor
4+ value : " false"
5+ - key : eigen-avoid-auto.OnlyExpressions
6+ value : " false"
7+ - key : eigen-avoid-auto.BanDecltypeAuto
8+ value : " true"
Original file line number Diff line number Diff line change @@ -26,9 +26,28 @@ EXAMPLE_BUILD_DIR="$EXAMPLE_DIR/build"
2626cmake -S " $EXAMPLE_DIR " -B " $EXAMPLE_BUILD_DIR "
2727cmake --build " $EXAMPLE_BUILD_DIR " --target example_repo -- -j" $( nproc) "
2828
29- CLANG_TIDY_BIN=${CLANG_TIDY:- clang-tidy}
30- if ! command -v " $CLANG_TIDY_BIN " > /dev/null 2>&1 ; then
31- echo " clang-tidy executable '$CLANG_TIDY_BIN ' not found in PATH" >&2
29+ CLANG_TIDY_BIN=${CLANG_TIDY:- }
30+ if [[ -z " $CLANG_TIDY_BIN " ]]; then
31+ if command -v clang-tidy > /dev/null 2>&1 ; then
32+ CLANG_TIDY_BIN=$( command -v clang-tidy)
33+ else
34+ shopt -s nullglob
35+ IFS=: read -r -a path_dirs <<< " $PATH"
36+ versioned_bins=()
37+ for dir in " ${path_dirs[@]} " ; do
38+ for candidate in " $dir " /clang-tidy-[0-9]* ; do
39+ [[ -x " $candidate " ]] && versioned_bins+=(" $candidate " )
40+ done
41+ done
42+ shopt -u nullglob
43+ if [[ ${# versioned_bins[@]} -gt 0 ]]; then
44+ CLANG_TIDY_BIN=$( printf ' %s\n' " ${versioned_bins[@]} " | sort -V | tail -n1)
45+ fi
46+ fi
47+ fi
48+
49+ if [[ -z " $CLANG_TIDY_BIN " || ! -x " $CLANG_TIDY_BIN " ]]; then
50+ echo " clang-tidy executable not found in PATH" >&2
3251 exit 1
3352fi
3453
You can’t perform that action at this time.
0 commit comments