Skip to content

Commit ff95c98

Browse files
committed
ENH: Improve the removal of trailing whitespace
Update the Makefile to add PHONY targets and to remove trailing whitespace from both .py and .rst files.
1 parent 3a41178 commit ff95c98

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
PYTHON ?= python
66
NOSETESTS ?= nosetests
77

8+
.PHONY: zipdoc sdist egg upload_to_pypi trailing-spaces clean-pyc clean-so clean-build clean-ctags clean in inplace test-code test-doc test-coverage test html specs check-before-commit check
9+
810
zipdoc: html
911
zip documentation.zip doc/_build/html
1012

@@ -26,7 +28,7 @@ upload_to_pypi: zipdoc
2628
python setup.py sdist --formats=zip,gztar upload
2729

2830
trailing-spaces:
29-
find . -name "*.py" | xargs perl -pi -e 's/[ \t]*$$//'
31+
find . -name "*[.py|.rst]" -type f | xargs perl -pi -e 's/[ \t]*$$//'
3032
@echo "Reverting test_docparse"
3133
git checkout nipype/utils/tests/test_docparse.py
3234

@@ -70,6 +72,7 @@ specs:
7072
@echo "Checking specs and autogenerating spec tests"
7173
python tools/checkspecs.py
7274

75+
check: check-before-commit # just a shortcut
7376
check-before-commit: specs trailing-spaces html test
7477
@echo "removed spaces"
7578
@echo "built docs"

0 commit comments

Comments
 (0)