--- /dev/null
+---
+Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,-clang-analyzer-optin.performance.Padding'
+HeaderFilterRegex: 'src/.*|unittest/.*'
+CheckOptions:
+...
+
CPPCHECK_SUPPRESSIONS = misc/cppcheck-suppressions.txt
SHELLCHECK = shellcheck
SHELLCHECK_EXCLUDES = misc/shellcheck-excludes.txt
+COMPILEDB = compiledb
+CLANG_TIDY = clang-tidy
SCAN_BUILD = scan-build
DOCKER = docker
GPERF = gperf
unittest/suites.h
files_to_clean += *.tar.bz2 *.tar.gz *.tar.xz *.xml .deps/* perfdir.*
+files_to_clean += compile_commands.json
files_to_distclean += $(built_dist_files) src/version.c unittest/suites.h
files_to_distclean += .deps dev.mk
uncrustify:
uncrustify -c misc/uncrustify.cfg --no-backup --replace $(filter-out $(uncrustify_exclude_files), $(base_sources)) $(test_sources)
+# pip install compiledb
+compile_commands.json:
+ $(COMPILEDB) -n $(MAKE) all unittest
+
+.PHONY: tidy
+tidy: compile_commands.json
+ $(CLANG_TIDY) $(all_sources)
+
.PHONY: analyze
analyze:
$(SCAN_BUILD) --use-cc=$(CC) $(srcdir)/configure