Page MenuHomePhabricator

Don't use error context from JSHint in linter messages
ClosedPublic

Authored by joshuaspence on Jun 23 2014, 12:30 AM.
Tags
None
Referenced Files
F14398523: D9675.diff
Sun, Dec 22, 2:11 PM
Unknown Object (File)
Fri, Dec 13, 8:16 PM
Unknown Object (File)
Tue, Dec 3, 3:12 PM
Unknown Object (File)
Tue, Dec 3, 3:12 PM
Unknown Object (File)
Tue, Dec 3, 3:12 PM
Unknown Object (File)
Tue, Dec 3, 2:51 PM
Unknown Object (File)
Sun, Dec 1, 3:16 PM
Unknown Object (File)
Nov 20 2024, 11:32 PM
Subscribers

Details

Summary

The error context (a.k.a. "original text") as provided by jshint is not very useful and actually causes arc lint to display the lint message incorrectly.

jshint-evidence (579×1 px, 77 KB)

The underlying problem here is that the error context from jshint contains the entire line from the input file rather than just the offending source code.

Test Plan

Ran arc lint -- webroot/rsrc/js/core/behavior-hovercard.js (in rP) and verified that the output looked reasonable.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Don't use error context from JSHint in linter messages.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 23 2014, 12:32 AM