Test Plan:
$ arc lint a.py # with too long line
Reviewers: zeeg, epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3882
return $this;
}
+ protected function getPEP8WithTextOptions() {
+ // E101 is subset of TXT2 (Tab Literal).
+ // E501 is same as TXT3 (Line Too Long).
+ // W291 is same as TXT6 (Trailing Whitespace).
+ // W292 is same as TXT4 (File Does Not End in Newline).
+ // W293 is same as TXT6 (Trailing Whitespace).
+ return '--ignore=E101,E501,W291,W292,W293';
+ }
+
}
$py_paths = preg_grep('/\.py$/', $paths);
$linters[] = id(new ArcanistPyFlakesLinter())->setPaths($py_paths);
- $linters[] = id(new ArcanistPEP8Linter())->setPaths($py_paths);
+ $linters[] = id(new ArcanistPEP8Linter())
+ ->setConfig(array('options' => $this->getPEP8WithTextOptions()))
+ ->setPaths($py_paths);
$linters[] = id(new ArcanistRubyLinter())
->setPaths(preg_grep('/\.rb$/', $paths));
$options = $working_copy->getConfig('lint.pep8.options');
if ($options === null) {
- // W293 (blank line contains whitespace) is redundant when used
- // alongside TXT6, causing pain to python programmers.
- return '--ignore=W293';
+ $options = $this->getConfig('options');
}
return $options;