Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15433571
D11199.id26898.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
D11199.id26898.diff
View Options
diff --git a/src/lint/linter/ArcanistCoffeeLintLinter.php b/src/lint/linter/ArcanistCoffeeLintLinter.php
--- a/src/lint/linter/ArcanistCoffeeLintLinter.php
+++ b/src/lint/linter/ArcanistCoffeeLintLinter.php
@@ -42,7 +42,9 @@
}
public function getInstallInstructions() {
- return pht('Install CoffeeLint using `npm install -g coffeelint`.');
+ return pht(
+ 'Install CoffeeLint using `%s`.',
+ 'npm install -g coffeelint');
}
public function shouldExpectCommandErrors() {
@@ -102,20 +104,20 @@
$files = $report_dom->getElementsByTagName('file');
$messages = array();
+
foreach ($files as $file) {
foreach ($file->getElementsByTagName('error') as $error) {
-
// Column number is not provided in the output.
// See https://github.com/clutchski/coffeelint/issues/87
- $message = new ArcanistLintMessage();
- $message->setPath($path);
- $message->setLine($error->getAttribute('line'));
- $message->setCode($this->getLinterName());
- $message->setDescription(preg_replace(
- '/; context: .*$/',
- '.',
- $error->getAttribute('message')));
+ $message = id(new ArcanistLintMessage())
+ ->setPath($path)
+ ->setLine($error->getAttribute('line'))
+ ->setCode($this->getLinterName())
+ ->setDescription(preg_replace(
+ '/; context: .*$/',
+ '.',
+ $error->getAttribute('message')));
switch ($error->getAttribute('severity')) {
case 'warning':
@@ -139,10 +141,8 @@
}
protected function getLintCodeFromLinterConfigurationKey($code) {
-
// NOTE: We can't figure out which rule generated each message, so we
// can not customize severities.
-
throw new Exception(
pht(
"CoffeeLint does not currently support custom severity levels, ".
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 25, 11:47 PM (5 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7372419
Default Alt Text
D11199.id26898.diff (1 KB)
Attached To
Mode
D11199: Minor tidying of `ArcanistCoffeeLintLinter`
Attached
Detach File
Event Timeline
Log In to Comment