From: Martin Basti Date: Sun, 26 Jun 2016 19:09:04 +0000 (+0200) Subject: Add pylint checker X-Git-Tag: v1.15.0~42^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7e0aefa19e33fdc896596ab0867ac5c86faf772;p=thirdparty%2Fdnspython.git Add pylint checker --- diff --git a/.travis.yml b/.travis.yml index 977af17c..46a1b138 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ python: - "3.5-dev" # 3.5 development branch - "nightly" # currently points to 3.6-dev install: - - pip install unittest2 + - pip install unittest2 pylint script: + - if [[ $TRAVIS_PYTHON_VERSION != '2.6' ]]; then make lint; fi - make test diff --git a/Makefile b/Makefile index fdc4792a..3c6dd842 100644 --- a/Makefile +++ b/Makefile @@ -59,3 +59,6 @@ check: test test: cd tests; make PYTHON=${PYTHON} test + +lint: + pylint dns diff --git a/pylintrc b/pylintrc new file mode 100644 index 00000000..b305bdad --- /dev/null +++ b/pylintrc @@ -0,0 +1,73 @@ +[MASTER] +# Pickle collected data for later comparisons. +persistent=no + +# Use multiple processes to speed up Pylint. +jobs=1 + +[MESSAGES CONTROL] + +enable= + all, + python3 + +disable= + R, + I, + anomalous-backslash-in-string, + arguments-differ, + assigning-non-slot, + attribute-defined-outside-init, + bad-builtin, + bad-continuation, + bad-whitespace, + bare-except, + basestring-builtin, + delslice-method, + deprecated-lambda, + deprecated-method, + dict-iter-method, + fixme, + getslice-method, + global-statement, + import-error, + invalid-name, + long-builtin, + missing-docstring, + no-absolute-import, + no-member, + notimplemented-raised, + old-division, + protected-access, + range-builtin-not-iterating, + redefined-builtin, + round-builtin, + superfluous-parens, + too-many-lines, + undefined-loop-variable, + undefined-variable, + unichr-builtin, + unicode-builtin, + unnecessary-lambda, + unneeded-not, + unused-argument, + unused-import, + unused-variable, + wrong-import-order, + wrong-import-position, + xrange-builtin + + +[REPORTS] + +# Set the output format. Available formats are text, parseable, colorized, msvs +# (visual studio) and html. You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=colorized + +# Tells whether to display a full report or only the messages +reports=no + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg})' diff --git a/tox.ini b/tox.ini index 3d195d7a..ff9b86d1 100644 --- a/tox.ini +++ b/tox.ini @@ -9,7 +9,7 @@ envlist = py34, # py35, flake8, -# pylint, + pylint, coverage [testenv] @@ -29,6 +29,11 @@ commands = pip install flake8 flake8 dns +[testenv:pylint] +commands = + pip install pylint + pylint dns + [testenv:coverage] basepython = python2