Skip to content

Commit a371a4f

Browse files
committed
Makefile: simplify fmt
We can use git ls-files for clang-format, and gofmt directly for Go (as we don't have vendor). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent b559ae3 commit a371a4f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ install.podman: bin/conmon
121121

122122
.PHONY: fmt
123123
fmt:
124-
find . '(' -name '*.h' -o -name '*.c' ! -path './vendor/*' ')' -exec clang-format -i {} \+
125-
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
126-
git diff --exit-code
124+
git ls-files -z \*.c \*.h | xargs -0 clang-format -i
125+
gofmt -s -w .
127126

128127

129128
.PHONY: dbuild

0 commit comments

Comments
 (0)