diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-05-13 12:30:30 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-05-13 12:30:30 -0700 |
commit | 7486f5fff385e45f3e8eb7bd68972a1dc43e1fe0 (patch) | |
tree | 92715a50441ca8cce7365c31b675af8d94bff8c9 /Makefile | |
parent | 35535d582215d00ab1270ec2673e4fc3f5675b79 (diff) |
New lint target using clang-tidy.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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); \ |