add nocoding target

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3012 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2006-01-06 15:01:40 +00:00
parent 48cdfd32ee
commit a3ef5f88c4

View file

@ -129,3 +129,20 @@ pyflakes:
.PHONY: reindent
reindent:
$(PYTHON) config/reindent.py -r -v linkcheck
# find Python files without coding line
.PHONY: nocoding
nocoding:
@for f in `find . -type f -name \*.py`; do \
if ! grep -q -- "-\*- coding: .* -\*-" $$f; then \
echo "No coding: $$f"; \
fi; \
done
@for f in `find . -type f`; do \
if head -1 $$f | egrep -q "#!.*python"; then \
if ! grep -q -- "-\*- coding: .* -\*-" $$f; then \
echo "No coding: $$f"; \
fi; \
fi; \
done