Skip to content

Commit 3313281

Browse files
committed
Add lint target to Makefile.
1 parent 323865f commit 3313281

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ distclean: clean
5252
@rm -rf ./tests/__pycache__
5353
@rm -f ./tests/*.pyc
5454

55+
.PHONY: lint
56+
lint:
57+
# ifneq ($(PY),'XXX')
58+
# @echo "linting is currently restricted to a lowest common denomiator of PY2"
59+
# @exit 1
60+
# endif
61+
@./envhelp/python2 -m flake8 . --exclude=tests,state,envhelp,fixture,output,unittest,grsfs-fuse,irclib.py,seafile-seahub_settings-template.py --count --select=E9,F63,F7,F82 --show-source --statistics
62+
5563
.PHONY: test
5664
test: dependencies testconfig
5765
@$(PYTHON_BIN) -m unittest discover -s tests/

local-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# This list is mainly used to specify addons needed for the unit tests.
44
# We only need autopep8 on py 3 as it's used in 'make fmt' (with py3)
55
autopep8;python_version >= "3"
6+
flake8;python_version < "3"
67
# We need paramiko for the ssh unit tests
78
# NOTE: paramiko-3.0.0 dropped python2 and python3.6 support
89
paramiko;python_version >= "3.7"

0 commit comments

Comments
 (0)