Skip to content

Commit 2118805

Browse files
bmwillgitster
authored andcommitted
Makefile: add style build rule
Add the 'style' build rule which will run git-clang-format on the diff between HEAD and the current worktree. The result is a diff of suggested changes. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6134de6 commit 2118805

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,6 +2440,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
24402440
.PHONY: sparse $(SP_OBJ)
24412441
sparse: $(SP_OBJ)
24422442

2443+
.PHONY: style
2444+
style:
2445+
git clang-format --style file --diff --extensions c,h
2446+
24432447
check: common-cmds.h
24442448
@if sparse; \
24452449
then \

0 commit comments

Comments
 (0)