summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniela Plascencia <daplascen@gmail.com>2017-02-08 13:46:16 -0600
committerClaudiu Popa <pcmanticore@gmail.com>2017-02-08 21:46:16 +0200
commita59a1581571c8f27708778a9ded58435c05f7703 (patch)
tree94451cfa94f7fa9b3683a9bce0f492ac07186cf3
parentecd9d9e7db0d67db0691b1bbc869d82b915bc988 (diff)
downloadpylint-git-a59a1581571c8f27708778a9ded58435c05f7703.tar.gz
epylint: corrects msg-template object (#1311)
The way this object is defined, won't let the user modify the message template when pylint is called from a python script. Rearranging the order of variables on its definition prevents this behavior. Signed-off-by: Daniela Plascencia <daniela.plascencia@linux.intel.com>
-rw-r--r--ChangeLog3
-rwxr-xr-xpylint/epylint.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c9397c708..14d1768a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -279,6 +279,9 @@ Release date: tba
Fixes #1031
+ * Let the user modify msg-template when Pylint is called from a Python script
+
+ Fixes #1269
What's new in Pylint 1.6.3?
===========================
diff --git a/pylint/epylint.py b/pylint/epylint.py
index 9de061967..0b714fb4e 100755
--- a/pylint/epylint.py
+++ b/pylint/epylint.py
@@ -87,9 +87,9 @@ def lint(filename, options=None):
# Ensure we use the python and pylint associated with the running epylint
run_cmd = "import sys; from pylint.lint import Run; Run(sys.argv[1:])"
options = options or ['--disable=C,R,I']
- cmd = [sys.executable, "-c", run_cmd] + options + [
+ cmd = [sys.executable, "-c", run_cmd] + [
'--msg-template', '{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}',
- '-r', 'n', child_path]
+ '-r', 'n', child_path] + options
process = Popen(cmd, stdout=PIPE, cwd=parent_path, env=_get_env(),
universal_newlines=True)