From: Maria Matejka Date: Wed, 14 Aug 2019 08:14:15 +0000 (+0200) Subject: Makefile rule for static analyzer X-Git-Tag: v2.0.8~77^2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59a86cbc7c5d5640b16ca9d8a99be979b11a4c68;p=thirdparty%2Fbird.git Makefile rule for static analyzer --- diff --git a/Makefile.in b/Makefile.in index e6dbd572f..cf94e3520 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]`