From 07c77d4c24177ac3e11cafd27f34c9a758008db6 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Mon, 3 Jul 2023 22:16:37 +0200 Subject: make: add clang-format lint target --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 447467c..97ca475 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ bear: bear intercept -- $(MAKE) all bear citnames -all: build $(BINS) +all: lint build $(BINS) run: all @for BIN in $(BINS); do \ @@ -28,6 +28,9 @@ run: all $$BIN; \ done +lint: + clang-format --dry-run -Werror $(shell find -name '*.cc' -o -name '*.h') + build/%: build/%.o $(CXX) -o $@ $< $(LDFLAGS) -- cgit v1.2.3