From 5dcf6e8dda168db39192d5f23637b01e60f25af2 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 28 Nov 2017 11:07:35 +0100 Subject: [PATCH] Add make target for scan-build 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 --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 47fac90..1ee3eda 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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