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
F19905817: D9675.id23220.diff
Tue, Mar 31, 8:01 PM
F19757805: D9675.diff
Feb 17 2026, 8:18 PM
F19528953: D9675.diff
Jan 19 2026, 12:58 PM
F19526155: D9675.diff
Jan 18 2026, 2:26 PM
F19295221: D9675.id23222.diff
Dec 23 2025, 11:10 AM
F19052265: D9675.id.diff
Nov 28 2025, 4:23 AM
F18734987: D9675.id.diff
Sep 30 2025, 11:07 PM
F18637068: D9675.diff
Sep 17 2025, 6:22 AM
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
Branch
jshint-evidence
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1312
Build 1312: [Placeholder Plan] Wait for 30 Seconds

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