Test Plan:
Verified manually. Something like this in .arclint:
"linters" : {
"text" : {
"type" : "text",
"include" : "(\\.(txt|py|html?)$)",
"text.max-line-length": 200
}
changes the line length. Something other than an integer there raises an error.
Reviewers: epriestley, #blessed_reviewers, #arcanist
Reviewed By: epriestley, #blessed_reviewers, #arcanist
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D9029
return 0.5;
}
+ public function getLinterConfigurationOptions() {
+ $options = array(
+ 'text.max-line-length' => 'optional int',
+ );
+
+ return $options + parent::getLinterConfigurationOptions();
+ }
+
public function setMaxLineLength($new_length) {
$this->maxLineLength = $new_length;
return $this;
}
+ public function setLinterConfigurationValue($key, $value) {
+ switch ($key) {
+ case 'text.max-line-length':
+ $this->setMaxLineLength($value);
+ return;
+ }
+
+ return parent::setLinterConfigurationValue($key, $value);
+ }
+
public function getLinterName() {
return 'TXT';
}