Skip to content

Commit

Permalink
Add Makefile and LDAP related types to indent.pro
Browse files Browse the repository at this point in the history
Makefile contains targets to run indent and autopep8.
  • Loading branch information
Christian Heimes authored and Petr Viktorin committed Mar 14, 2018
1 parent e33ad51 commit b0f3642
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .indent.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b0f3642

Please sign in to comment.