summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4ccbd96..dc82967 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ CLANG_CHECK?=clang-check
CLANG_FORMAT=clang-format -style llvm -sort-includes=0 -i
AFL_PATH?=/usr/local/bin
-.PHONY: all cmake_build leakcheck clean fuzztest test debug ubsan asan mingw archive newbench bench format update-spec afl clang-check libFuzzer
+.PHONY: all cmake_build leakcheck clean fuzztest test debug ubsan asan mingw archive newbench bench format update-spec afl libFuzzer lint
all: cmake_build man/man3/cmark.3
@@ -92,8 +92,9 @@ libFuzzer:
$(MAKE) -j2 -C $(BUILDDIR) cmark-fuzz
test/run-cmark-fuzz $(CMARK_FUZZ)
-clang-check: all
- ${CLANG_CHECK} -p build -analyze src/*.c
+lint: $(BUILDDIR)
+ for f in `ls src/*.[ch] | grep -v "scanners.c"` ; \
+ do echo $$f ; clang-tidy -header-filter='^build/.*' -p=build -warnings-as-errors='*' $$f || exit 1 ; done
mingw:
mkdir -p $(MINGW_BUILDDIR); \