aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-10-23 00:33:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-10-27 15:59:38 +0200
commitbe208141915f18d4ffae66078303fe15d717c8b5 (patch)
treed27562b8d9c0550dff39094cb1577ac72ffad3f8 /src
parent803496fa10822cb3fa15e51d3a189e8a948d33a4 (diff)
Makefile: add 'tidy' target that runs clang-tidy
Available in the root, src and lib dirs. Closes #3163
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 80cbce206..8fd9dc32d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -140,3 +140,11 @@ if CURLDEBUG
# for debug builds, we scan the sources on all regular make invokes
all-local: checksrc
endif
+
+# disable the tests that are mostly causing false positives
+TIDYFLAGS=-checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-valist.Uninitialized,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference
+
+TIDY:=clang-tidy
+
+tidy:
+ $(TIDY) $(CURL_CFILES) $(TIDYFLAGS) -- $(AM_CPPFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H