From f2f9bed2b7d3eeba2a500c9f404992e11eff51d2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 12 Jan 2017 08:00:56 -0500 Subject: Run lint with tox. I wish it ran faster... --- Makefile | 9 +++++---- __main__.py | 3 ++- tox.ini | 11 +++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e7420a7e..a9a5a729 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,13 @@ clean: sterile: clean -rm -rf .tox* -LINTABLE = coverage igor.py setup.py tests ci/*.py +LINTABLE = coverage tests igor.py setup.py __main__.py lint: - -pylint $(LINTABLE) - python -m tabnanny $(LINTABLE) - python igor.py check_eol + tox -e lint + +todo: + -grep -R --include=*.py TODO $(LINTABLE) spell: -pylint --disable=all --enable=spelling $(LINTABLE) diff --git a/__main__.py b/__main__.py index a44b820a..c998e1da 100644 --- a/__main__.py +++ b/__main__.py @@ -3,7 +3,8 @@ """Be able to execute coverage.py by pointing Python at a working tree.""" -import runpy, os +import runpy +import os PKG = 'coverage' diff --git a/tox.ini b/tox.ini index ed41acae..2a83f6f4 100644 --- a/tox.ini +++ b/tox.ini @@ -69,3 +69,14 @@ commands = sphinx-build -b html -b linkcheck -aEnQW doc doc/_build/html sphinx-build -b html -aqE doc doc/_build/html rst2html.py --strict README.rst doc/_build/trash + +[testenv:lint] +deps = -rrequirements/dev.pip + +setenv = + LINTABLE = coverage tests igor.py setup.py __main__.py + +commands = + python -m pylint --notes= {env:LINTABLE} + python -m tabnanny {env:LINTABLE} + python igor.py check_eol -- cgit v1.2.1