Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15414445
D21289.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
935 B
Referenced Files
None
Subscribers
None
D21289.diff
View Options
diff --git a/src/lint/linter/ArcanistCpplintLinter.php b/src/lint/linter/ArcanistCpplintLinter.php
--- a/src/lint/linter/ArcanistCpplintLinter.php
+++ b/src/lint/linter/ArcanistCpplintLinter.php
@@ -48,12 +48,22 @@
$message = new ArcanistLintMessage();
$message->setPath($path);
- $message->setLine($matches[1]);
$message->setCode($matches[3]);
$message->setName($matches[3]);
$message->setDescription($matches[2]);
$message->setSeverity($severity);
+ // NOTE: "cpplint" raises some messages which apply to the whole file,
+ // like "no #ifndef guard found". It raises these messages on line 0.
+
+ // Arcanist messages should have a "null" line, not a "0" line, if they
+ // aren't bound to a particular line number.
+
+ $line = (int)$matches[1];
+ if ($line > 0) {
+ $message->setLine($line);
+ }
+
$messages[] = $message;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 12:37 AM (20 h, 23 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7385552
Default Alt Text
D21289.diff (935 B)
Attached To
Mode
D21289: In the "cpplint" binding, raise messages on "line 0" without a line
Attached
Detach File
Event Timeline
Log In to Comment