Skip to content

Commit a57cb09

Browse files
committed
Add lint target to Makefile.
1 parent e798d51 commit a57cb09

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Makefile

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

55+
.PHONY: lint
56+
lint:
57+
@./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
58+
5559
.PHONY: test
5660
test: dependencies testconfig
5761
@$(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)