Skip to content

Commit

Permalink
Add make target for scan-build
Browse files Browse the repository at this point in the history
Scan-build is a frontend to clang's static code analyzer. It checks C
code for bugs.

https://github.com/python-ldap/python-ldap/pull/39
Signed-off-by: Christian Heimes <cheimes@redhat.com>
  • Loading branch information
Christian Heimes authored and Petr Viktorin committed Nov 28, 2017
1 parent 54a286b commit 5dcf6e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
PYTHON=python3
LCOV_INFO=build/lcov.info
LCOV_REPORT=build/lcov_report
LCOV_REPORT_OPTIONS=--show-details -no-branch-coverage \
--title "python-ldap LCOV report"
SCAN_REPORT=build/scan_report

.NOTPARALLEL:

Expand Down Expand Up @@ -40,3 +42,10 @@ lcov-open: $(LCOV_REPORT)
lcov: lcov-clean
$(MAKE) lcov-coverage
$(MAKE) lcov-report

# clang-analyzer for static C code analysis
.PHONY: scan-build
scan-build:
scan-build -o $(SCAN_REPORT) --html-title="python-ldap scan report" \
-analyze-headers --view \
$(PYTHON) setup.py clean --all build

0 comments on commit 5dcf6e8

Please sign in to comment.