From b0f364247cb2a42841d175b8949330f4eb360335 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 22 Nov 2017 13:57:22 +0100 Subject: [PATCH] Add Makefile and LDAP related types to indent.pro Makefile contains targets to run indent and autopep8. --- .indent.pro | 7 +++++++ Makefile | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.indent.pro b/.indent.pro index 02cceb6..4e8adc1 100644 --- a/.indent.pro +++ b/.indent.pro @@ -22,3 +22,10 @@ --swallow-optional-blank-lines -T PyCFunction -T PyObject +-T PyMethodDef +-T LDAP +-T LDAPMod +-T LDAPMessage +-T LDAPControl +-T LDAPObject +-T sasl_interact_t diff --git a/Makefile b/Makefile index e4ff75a..c4c2ca1 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ LCOV_REPORT_OPTIONS=--show-details -no-branch-coverage \ --title "python-ldap LCOV report" SCAN_REPORT=build/scan_report PYTHON_SUPP=/usr/share/doc/python3-devel/valgrind-python.supp +AUTOPEP8_OPTS=--aggressive .NOTPARALLEL: @@ -13,7 +14,7 @@ all: .PHONY: clean clean: - rm -rf build dist *.egg-info $(VENV) .tox MANIFEST + rm -rf build dist *.egg-info .tox MANIFEST rm -f .coverage .coverage.* find . \( -name '*.py[co]' -or -name '*.so*' -or -name '*.dylib' \) \ -delete @@ -77,3 +78,14 @@ valgrind: build $(PYTHON_SUPP) echo "Found definitive leak, see build/valgrind.log"; \ exit 1; \ fi + +# Code autoformatter +.PHONY: indent +indent: + indent Modules/*.c Modules/*.h + rm -f Modules/*.c~ Modules/*.h~ + +.PHONY: autopep8 +autopep8: + $(PYTHON) -m autopep8 -r -i -j0 $(AUTOPEP8_OPTS) \ + Demo Lib Tests setup.py