]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Add pylint checker
authorMartin Basti <martin.basti@gmail.com>
Sun, 26 Jun 2016 19:09:04 +0000 (21:09 +0200)
committerMartin Basti <martin.basti@gmail.com>
Sun, 26 Jun 2016 23:35:43 +0000 (01:35 +0200)
.travis.yml
Makefile
pylintrc [new file with mode: 0644]
tox.ini

index 977af17c95741e381aed33ba2d39ded061bbf24a..46a1b1386f7a2badbd2c2a99ee6efce342faed48 100644 (file)
@@ -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
index fdc4792a377370ebfd50a376dbfbdef33873e008..3c6dd84211d8d90063ad28f86219d896f0ed4424 100644 (file)
--- 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 (file)
index 0000000..b305bda
--- /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 3d195d7ac2b2f4360d6a0e23d26dd05bd2ccbfa3..ff9b86d108a3856e99bb0764e7fcc805b9ea3cd3 100644 (file)
--- 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