Makefile rule for static analyzer
This commit is contained in:
parent
3c838ad9fd
commit
59a86cbc7c
1 changed files with 8 additions and 0 deletions
|
@ -184,6 +184,14 @@ check: tests tests_run
|
||||||
tests: $(tests_targets)
|
tests: $(tests_targets)
|
||||||
tests_run: $(tests_targets_ok)
|
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:
|
tags:
|
||||||
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`
|
cd $(srcdir) ; etags -lc `find $(dirs) -name *.[chY]`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue