about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-01-20 12:07:53 +0100
committernfnty <git@nfnty.se>2017-01-20 12:07:53 +0100
commit1c90e610de6591e8052a1056c775219b5e767002 (patch)
tree69b56f67dee1d6dfcea869de897846baaded3fa6 /Makefile
parente26d163debc9f55a89a27f94a43771526d2ff0b7 (diff)
parent03ee065e35c6a8f0e0dc1e66d8f4c3e83c51f315 (diff)
downloadranger-1c90e610de6591e8052a1056c775219b5e767002.tar.gz
Merge branch 'lint'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 870901da..cd871d2e 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,19 @@ doc: cleandoc
 		pydoc.writedocs("$(CWD)")'
 	find . -name \*.html -exec sed -i 's|'"$(CWD)"'|../..|g' -- {} \;
 
+TEST_PATHS_MAIN = \
+	$(shell find ranger -mindepth 1 -maxdepth 1 -type d -and -not -name '__pycache__' -and -not -path 'ranger/config' -and -not -path 'ranger/data') \
+	ranger/__init__.py \
+	$(shell find . '(' -path './ranger' -or -path './tests' ')' -prune -or -type f -name '*.py' -print) \
+	tests
+TEST_PATH_CONFIG = ranger/config
+
 test:
+	@echo "Running pylint..."
+	pylint $(TEST_PATHS_MAIN)
+	pylint --rcfile=$(TEST_PATH_CONFIG)/pylintrc $(TEST_PATH_CONFIG)
+	@echo "Running flake8..."
+	flake8 $(TEST_PATHS_MAIN) $(TEST_PATH_CONFIG)
 	@echo "Running doctests..."
 	@for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \
 		echo "Testing $$FILE..."; \