Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3749516
D2053.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
D2053.diff
View Options
diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -51,6 +51,11 @@
}
```
+**OPTIONS**
+
+Please see `arc linters shellcheck` for the list of options supported by this
+linter.
+
**TIPS**
As Arcanist currently doesn't detect file formats or doesn't parse
diff --git a/lint/linter/ArcanistShellCheckLinter.php b/lint/linter/ArcanistShellCheckLinter.php
--- a/lint/linter/ArcanistShellCheckLinter.php
+++ b/lint/linter/ArcanistShellCheckLinter.php
@@ -3,6 +3,7 @@
final class ArcanistShellCheckLinter extends ArcanistExternalLinter {
private $shell;
+ private $exclude;
public function getInfoName() {
return 'ShellCheck';
@@ -37,6 +38,10 @@
'ksh',
'zsh'),
),
+ 'shellcheck.exclude' => array(
+ 'type' => 'optional list<string>',
+ 'help' => pht('Specify excluded checks, e.g.: SC2035.'),
+ ),
);
return $options + parent::getLinterConfigurationOptions();
@@ -48,6 +53,10 @@
$this->setShell($value);
return;
+ case 'shellcheck.exclude':
+ $this->setExclude($value);
+ return;
+
default:
return parent::setLinterConfigurationValue($key, $value);
}
@@ -58,6 +67,11 @@
return $this;
}
+ public function setExclude($exclude) {
+ $this->exclude = $exclude;
+ return $this;
+ }
+
public function getDefaultBinary() {
return 'shellcheck';
}
@@ -77,6 +91,12 @@
$options[] = '--shell='.$this->shell;
}
+ if ($this->exclude) {
+ foreach ($this->exclude as $code) {
+ $options[] = '--exclude='.$code;
+ }
+ }
+
return $options;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 15:53 (21 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249592
Default Alt Text
D2053.diff (1 KB)
Attached To
Mode
D2053: add shellcheck.exclude option to exclude certain checks
Attached
Detach File
Event Timeline
Log In to Comment