Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15476545
D21290.id50700.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
D21290.id50700.diff
View Options
diff --git a/src/lint/renderer/ArcanistConsoleLintRenderer.php b/src/lint/renderer/ArcanistConsoleLintRenderer.php
--- a/src/lint/renderer/ArcanistConsoleLintRenderer.php
+++ b/src/lint/renderer/ArcanistConsoleLintRenderer.php
@@ -146,11 +146,16 @@
$char - 1,
strlen($original));
- $new_lines[$start - 1] = substr_replace(
- $new_lines[$start - 1],
- $this->highlightText($replacement),
- $char - 1,
- strlen($replacement));
+ // See T13543. The message may have completely removed this line: for
+ // example, if it trimmed trailing spaces from the end of a file. If
+ // the line no longer exists, don't try to highlight it.
+ if (isset($new_lines[$start - 1])) {
+ $new_lines[$start - 1] = substr_replace(
+ $new_lines[$start - 1],
+ $this->highlightText($replacement),
+ $char - 1,
+ strlen($replacement));
+ }
}
// If lines at the beginning of the changed line range are actually the
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 8, 7:13 AM (12 h, 34 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7388844
Default Alt Text
D21290.id50700.diff (1 KB)
Attached To
Mode
D21290: Fix an issue when rendering a lint message which removes whitespace at the end of a file
Attached
Detach File
Event Timeline
Log In to Comment