Page MenuHomePhabricator

Correct lint rendering when patching trailing whitespace in files
ClosedPublic

Authored by epriestley on Sep 20 2017, 7:02 PM.
Tags
None
Referenced Files
F15496485: D18631.id44730.diff
Sun, Apr 13, 6:56 AM
F15495538: D18631.id.diff
Sun, Apr 13, 4:51 AM
F15494986: D18631.id44729.diff
Sun, Apr 13, 2:16 AM
F15493031: D18631.id.diff
Sat, Apr 12, 8:56 PM
F15489002: D18631.diff
Fri, Apr 11, 5:08 AM
F15469280: D18631.id44729.diff
Fri, Apr 4, 11:28 AM
F15454607: D18631.diff
Sat, Mar 29, 7:19 PM
F15397916: D18631.id44728.diff
Sun, Mar 16, 10:56 PM
Subscribers
None

Details

Summary

Ref PHI48. If a patch removes all of the lines at the end of a file, we can get some array index errors.

Test Plan

Added failing test, made it pass.

Diff Detail

Repository
rARC Arcanist
Branch
extrawhite
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixsrc/lint/renderer/__tests__/data/extrawhitespace.txt:2TXT9Trailing Whitespace at EOF
Unit
Tests Passed
Build Status
Buildable 18505
Build 24922: Run Core Tests
Build 24921: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Sep 20 2017, 7:04 PM
  • Be a little more clever so the test case does not need to have trailing whitespace itself.
  • Also, this made a lint description more concise.
This revision was automatically updated to reflect the committed changes.