Format source files

This commit is contained in:
2023-02-18 10:37:38 +01:00
parent 76d93bb1cf
commit d09d4d3d92
12 changed files with 793 additions and 850 deletions

View File

@@ -4,7 +4,7 @@ CFLAGS = -std=c++17 -Wall -g -Wextra
CPPS = $(wildcard test/*.cpp)
EXES = $(patsubst %.cpp, %.out, $(CPPS))
.PHONY: all clean rebuild check
.PHONY: all clean rebuild check format
all: $(EXES)
@@ -19,5 +19,11 @@ EXESQUOTED = $(patsubst %, "%", $(EXES))
check: all
./execute-all.sh
format:
find src/ -name *.cpp -exec clang-format -i {} \;
find src/ -name *.hpp -exec clang-format -i {} \;
find test/ -name *.cpp -exec clang-format -i {} \;
find test/ -name *.hpp -exec clang-format -i {} \;
%.out: %.cpp
$(CC) $(CFLAGS) $< -o $@