]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Ignore redundant PEP8 lint rule: W293
authorgrglr <grglr@fb.com>
Sat, 25 Jun 2011 00:19:42 +0000 (17:19 -0700)
committergrglr <grglr@fb.com>
Sat, 25 Jun 2011 00:42:07 +0000 (17:42 -0700)
Summary:
W293 reports a lint warning for the same problem that TXT6 reports a
lint error for.  This isn't so terrible in and of itself.

However, when you are then prompted to apply a patch to fix TXT6, lint
doesn't realize that the W293 warning was also handled, and still
prompts you about ignoring unresolved warnings.  This is misleading.

Test Plan:
> python pep8.py hasBlankLineWS.py
hasBlankLineWS.py:3:1: W293 blank line contains whitespace
> python pep8.py --ignore=W293 hasBlankLineWS.py
(no output)

Reviewed By: epriestley
Reviewers: jungejason, epriestley
CC: epriestley, aran
Differential Revision: 525

src/lint/linter/pep8/ArcanistPEP8Linter.php

index 978d1b8018b81b8a43f6b8364a170228c8fb24da..92343255a65851ca05fdcdab685a50e889397e09 100644 (file)
@@ -41,7 +41,9 @@ class ArcanistPEP8Linter extends ArcanistLinter {
   }
 
   public function getPEP8Options() {
-    return null;
+    // W293 (blank line contains whitespace) is redundant when used
+    // alongside TXT6, causing pain to python programmers.
+    return '--ignore=W293';
   }
 
   public function lintPath($path) {