Skip to content

Commit 76d8392

Browse files
committed
Add a target to format code
1 parent 55b9ff4 commit 76d8392

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.clang-format

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
BasedOnStyle: Google
2+
IndentWidth: 4
3+
BreakBeforeBraces: Linux
4+
AllowShortBlocksOnASingleLine: false
5+
AllowShortFunctionsOnASingleLine: false
6+
AllowShortIfStatementsOnASingleLine: false
7+
AllowShortLoopsOnASingleLine: false

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ check: $(TESTS)
2525
clean:
2626
rm -f $(LIB) $(OBJ) $(TESTS) $(TEST_OBJ)
2727

28-
.PHONY: check clean
28+
format:
29+
clang-format -i */*.{c,h}
30+
31+
.PHONY: check clean format

0 commit comments

Comments
 (0)