Page MenuHomePhabricator

When a linter raises a message at a nonexistent line, don't fatal during rendering
ClosedPublic

Authored by epriestley on Jun 12 2020, 7:11 PM.
Tags
None
Referenced Files
F15469373: D21357.id50836.diff
Fri, Apr 4, 12:30 PM
F15457048: D21357.diff
Sun, Mar 30, 1:59 PM
F15432956: D21357.id50836.diff
Mon, Mar 24, 8:32 PM
F15422096: D21357.id50837.diff
Sat, Mar 22, 5:29 AM
F15412742: D21357.id50835.diff
Wed, Mar 19, 2:40 PM
F15334375: D21357.diff
Sat, Mar 8, 8:36 AM
F15305582: D21357.id50835.diff
Thu, Mar 6, 3:03 AM
F15303155: D21357.id50837.diff
Thu, Mar 6, 12:14 AM
Subscribers
None

Details

Summary

See PHI1782. If a linter raises a message at a line which does not exist in the file, render a confused warning rather than fataling.

This is a long-existing issue which was exacerbated by D21044.

Test Plan

Modified a linter to raise issues at line 99999. Before change: fatal in console rendering. After change: reasonable rendering.

Diff Detail

Repository
rARC Arcanist
Branch
lint1
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 24655
Build 33995: Run Core Tests
Build 33994: arc lint + arc unit

Unit TestsFailed

TimeTest
23 msArcanistConsoleLintRendererTestCase::testRendering
Assertion failed, expected values to be equal (at ArcanistConsoleLintRendererTestCase.php:226): Lint rendering for "eofmultilineline". Expected vs Actual Output Diff --- Old Value
12 msArcanistConsoleLintRendererTestCase::testRendering
Assertion failed, expected values to be equal (at ArcanistConsoleLintRendererTestCase.php:226): Lint rendering for "eofmultilineline". Expected vs Actual Output Diff --- Old Value
0 msAbstractDirectedGraphTestCase::testCyclicGraph
1 assertion(s) passed.
0 msAbstractDirectedGraphTestCase::testEdgeLoadFailure
1 assertion(s) passed.
0 msAbstractDirectedGraphTestCase::testNonTreeGraph
1 assertion(s) passed.
View Full Test Results (2 Failed · 470 Passed · 34 Skipped)

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 12 2020, 7:12 PM
Harbormaster failed remote builds in B24655: Diff 50835!
  • Allow a linter to raise messages just past the very end of a file.