Makefile rule for static analyzer

This commit is contained in:
Maria Matejka 2019-08-14 10:14:15 +02:00
parent 3c838ad9fd
commit 59a86cbc7c
1 changed files with 8 additions and 0 deletions

View File

@ -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]`