Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14108992
D21290.id50699.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.id50699.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
Thu, Nov 28, 1:11 PM (9 h, 18 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6800642
Default Alt Text
D21290.id50699.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