summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-08-14 10:14:15 +0200
committerMaria Matejka <mq@ucw.cz>2020-04-28 16:21:06 +0200
commit59a86cbc7c5d5640b16ca9d8a99be979b11a4c68 (patch)
tree83d72480fd23e7bb72e74ab627af784f36c607ae
parent3c838ad9fdc553c658ee2fbb466ab8ab4cd14805 (diff)
Makefile rule for static analyzer
-rw-r--r--Makefile.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index e6dbd572..cf94e352 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -184,6 +184,14 @@ check: tests tests_run
tests: $(tests_targets)
tests_run: $(tests_targets_ok)
+STATIC_CHECKERS := nullability.NullableDereferenced nullability.NullablePassedToNonnull nullability.NullableReturnedFromNonnull optin.portability.UnixAPI valist.CopyToSelf valist.Uninitialized valist.Unterminated
+STATIC_SCAN_FLAGS := --force-analyze-debug-code -o $(objdir)/static-scan/ $(addprefix -enable-checker ,$(STATIC_CHECKERS))
+
+static-scan:
+ $(E)echo Running static code analysis
+ $(Q)$(MAKE) clean
+ $(Q)scan-build $(STATIC_SCAN_FLAGS) $(MAKE) -$(MAKEFLAGS)
+
tags:
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`