Merge lp:~dobey/python-distutils-extra/check-cmd into lp:python-distutils-extra

Proposed by dobey
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dobey/python-distutils-extra/check-cmd
Merge into: lp:python-distutils-extra
Diff against target: None lines
To merge this branch: bzr merge lp:~dobey/python-distutils-extra/check-cmd
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+4896@code.launchpad.net
To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

     Add --output-format=parseable and --include-ids=yes to default args
     Only add config_file to args if we have one, rather than an empty string
     Add the files to lint to the arguments list outside of Popen

     This fixes an issue where for some reason pylint was running the lint checks
     on files in /usr/lib/python2.6/dist-packages even though they were not added
     to the arguments list by the code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'DistUtilsExtra/command/check.py'
2--- DistUtilsExtra/command/check.py 2009-03-23 17:08:17 +0000
3+++ DistUtilsExtra/command/check.py 2009-03-25 15:53:44 +0000
4@@ -54,11 +54,16 @@
5 self.lint_files = "[" + self.__find_files() + "]"
6
7 def run (self):
8- config_file = ""
9+ pylint_args = ["--output-format=parseable",
10+ "--include-ids=yes"]
11+
12 if self.config_file:
13- config_file = "--rcfile=" + self.config_file
14-
15- p = subprocess.Popen(["pylint", config_file] + eval(self.lint_files),
16+ pylint_args.append("--rcfile=" + self.config_file)
17+
18+ for file in eval(self.lint_files):
19+ pylint_args.append(file)
20+
21+ p = subprocess.Popen(["pylint"] + pylint_args,
22 bufsize=4096, stdout=subprocess.PIPE)
23 notices = p.stdout
24

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: