File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 8
8
9
9
REPO_ROOT=" $( git rev-parse --show-toplevel) "
10
10
11
- C_SOURCES=$( find " ${REPO_ROOT} " | egrep " \.(c|cxx|cpp|h|hpp)$" )
11
+ # Use git ls-files to only check files tracked by git (excludes submodules and generated files)
12
+ C_SOURCES=$( git ls-files " ${REPO_ROOT} " | egrep " \.(c|cxx|cpp|h|hpp)$" )
12
13
for file in ${C_SOURCES} ; do
13
14
clang-format-18 ${file} > expected-format
14
15
diff -u -p --label=" ${file} " --label=" expected coding style" ${file} expected-format
15
16
done
16
17
C_MISMATCH_LINE_CNT=$( clang-format-18 --output-replacements-xml ${C_SOURCES} | egrep -c " </replacement>" )
17
18
18
- SH_SOURCES=$( find " ${REPO_ROOT} " | egrep " \.sh$" )
19
+ SH_SOURCES=$( git ls-files " ${REPO_ROOT} " | egrep " \.sh$" )
19
20
for file in ${SH_SOURCES} ; do
20
21
shfmt -d " ${file} "
21
22
done
22
- SH_MISMATCH_FILE_CNT=$( shfmt -l ${SH_SOURCES} )
23
+ SH_MISMATCH_FILE_CNT=$( shfmt -l ${SH_SOURCES} | wc -l )
23
24
24
- PY_SOURCES=$( find " ${REPO_ROOT} " | egrep " \.py$" )
25
+ PY_SOURCES=$( git ls-files " ${REPO_ROOT} " | egrep " \.py$" )
25
26
for file in ${PY_SOURCES} ; do
26
27
echo " Checking Python file: ${file} "
27
28
black --diff " ${file} "
Original file line number Diff line number Diff line change 5
5
6
6
set -e
7
7
8
- PARALLEL=" ${PARALLEL:- -j$(nproc 2>/ dev/ null || sysctl -n hw.ncpu 2>/ dev/ null || echo 4)} "
8
+ PARALLEL=" ${PARALLEL:- -j$(nproc 2> / dev/ null || sysctl -n hw.ncpu 2> / dev/ null || echo 4)} "
9
9
10
10
echo " ======================================"
11
11
echo " JIT Debug Mode Test"
@@ -39,8 +39,7 @@ for config in \
39
39
" ENABLE_EXT_F=0" \
40
40
" ENABLE_EXT_M=0" \
41
41
" ENABLE_Zba=0" \
42
- " ENABLE_Zbb=0"
43
- do
42
+ " ENABLE_Zbb=0" ; do
44
43
echo " "
45
44
echo " Testing: $config with JIT debug"
46
45
make distclean
You can’t perform that action at this time.
0 commit comments