Page MenuHomePhabricator

Correct lint rendering when patching trailing whitespace in files
ClosedPublic

Authored by epriestley on Sep 20 2017, 7:02 PM.

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.