-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
31 lines (24 loc) · 975 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
SRC_DIR := src
PYFILES := `find $(SRC_DIR) -name "*.py"`
# Ignore certdata.py from style checks as tabs and trailing
# whitespace are required for testing.
TESTFILES=`find test/ \( ! -name certdata.py ! -name manifestdata.py \) -name "*.py"`
STYLEFILES=$(PYFILES) $(TESTFILES)
# we never "remake" this makefile, so add a target so
# # we stop searching for implicit rules on how to remake it
Makefile: ;
pylint:
@PYTHONPATH="src/:/usr/share/sm-photo-tool" pylint --rcfile=pylintrc $(STYLEFILES)
tablint:
@! GREP_COLOR='7;31' grep --color -nP "^\W*\t" $(STYLEFILES)
trailinglint:
@! GREP_COLOR='7;31' grep --color -nP "[ \t]$$" $(STYLEFILES)
.PHONY: whitespacelint
whitespacelint: tablint trailinglint
#INDENT_IGNORE = "E121,E122,E123,E124,E125,E126,E127,E128"
pep8:
@TMPFILE=`mktemp` || exit 1; \
pep8 --ignore E501,$(INDENT_IGNORE) --exclude ".#*" --repeat src $(STYLEFILES) | tee $$TMPFILE; \
! test -s $$TMPFILE
.PHONY: stylish
stylish: whitespacelint pep8