Skip to content

Commit 4161b1d

Browse files
committed
Makefile: limit scope of format/format-check
We don't want `.git` or `target/` or other misc dirs to be subject to these phony targets.
1 parent 6d69958 commit 4161b1d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Makefile

+4-6
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,15 @@ clean:
6262
rm -rf target
6363

6464
format:
65-
find . \
65+
find src tests \
6666
-name '*.[c|h]' \
67-
! -path "./target/*" \
68-
! -wholename './src/rustls.h' | \
67+
! -wholename 'src/rustls.h' | \
6968
xargs clang-format -i
7069

7170
format-check:
72-
find . \
71+
find src tests \
7372
-name '*.[c|h]' \
74-
! -path "./target/*" \
75-
! -wholename './src/rustls.h' | \
73+
! -wholename 'src/rustls.h' | \
7674
xargs clang-format --dry-run -Werror -i
7775

7876
.PHONY: all clean test integration format format-check

0 commit comments

Comments
 (0)