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
F15454607: D18631.diff
Sat, Mar 29, 7:19 PM
F15397916: D18631.id44728.diff
Sun, Mar 16, 10:56 PM
F15338690: D18631.diff
Sun, Mar 9, 12:16 PM
Unknown Object (File)
Feb 9 2025, 4:44 AM
Unknown Object (File)
Feb 9 2025, 4:44 AM
Unknown Object (File)
Feb 9 2025, 4:44 AM
Unknown Object (File)
Feb 9 2025, 4:44 AM
Unknown Object (File)
Feb 9 2025, 4:44 AM
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.