Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14024959
D10384.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10384.diff
View Options
diff --git a/src/lint/linter/ArcanistPuppetLintLinter.php b/src/lint/linter/ArcanistPuppetLintLinter.php
--- a/src/lint/linter/ArcanistPuppetLintLinter.php
+++ b/src/lint/linter/ArcanistPuppetLintLinter.php
@@ -5,12 +5,14 @@
*/
final class ArcanistPuppetLintLinter extends ArcanistExternalLinter {
+ private $config;
+
public function getInfoURI() {
return 'http://puppet-lint.com/';
}
public function getInfoName() {
- return pht('puppet-lint');
+ return 'puppet-lint';
}
public function getInfoDescription() {
@@ -64,6 +66,37 @@
'%{message}'))));
}
+ public function getLinterConfigurationOptions() {
+ $options = array(
+ 'puppet-lint.config' => array(
+ 'type' => 'optional string',
+ 'help' => pht('Pass in a custom configuration file path.'),
+ ),
+ );
+
+ return $options + parent::getLinterConfigurationOptions();
+ }
+
+ public function setLinterConfigurationValue($key, $value) {
+ switch ($key) {
+ case 'puppet-lint.config':
+ $this->config = $value;
+ return;
+ }
+
+ return parent::setLinterConfigurationValue($key, $value);
+ }
+
+ protected function getDefaultFlags() {
+ $options = array();
+
+ if ($this->config) {
+ $options[] = '--config='.$this->config;
+ }
+
+ return $options;
+ }
+
protected function parseLinterOutput($path, $err, $stdout, $stderr) {
$lines = phutil_split_lines($stdout, false);
diff --git a/src/lint/linter/__tests__/puppet-lint/arrow_alignment.lint-test b/src/lint/linter/__tests__/puppet-lint/arrow_alignment.lint-test
--- a/src/lint/linter/__tests__/puppet-lint/arrow_alignment.lint-test
+++ b/src/lint/linter/__tests__/puppet-lint/arrow_alignment.lint-test
@@ -3,4 +3,4 @@
refreshonly => true,
}
~~~~~~~~~~
-warning:3:15
+warning:2:13
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 1:42 PM (4 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719603
Default Alt Text
D10384.diff (1 KB)
Attached To
Mode
D10384: Update `puppet-lint` linter
Attached
Detach File
Event Timeline
Log In to Comment