Skip to content

Commit

Permalink
Makefile: limit scope of format/format-check
Browse files Browse the repository at this point in the history
We don't want `.git` or `target/` or other misc dirs to be subject to
these phony targets.
  • Loading branch information
cpu committed Apr 4, 2024
1 parent 6d69958 commit 4161b1d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,15 @@ clean:
rm -rf target

format:
find . \
find src tests \
-name '*.[c|h]' \
! -path "./target/*" \
! -wholename './src/rustls.h' | \
! -wholename 'src/rustls.h' | \
xargs clang-format -i

format-check:
find . \
find src tests \
-name '*.[c|h]' \
! -path "./target/*" \
! -wholename './src/rustls.h' | \
! -wholename 'src/rustls.h' | \
xargs clang-format --dry-run -Werror -i

.PHONY: all clean test integration format format-check

0 comments on commit 4161b1d

Please sign in to comment.