Page MenuHomePhabricator

Add a JSON linter.
ClosedPublic

Authored by joshuaspence on May 6 2014, 2:28 AM.
Tags
None
Referenced Files
F14018679: D8988.diff
Tue, Nov 5, 6:21 PM
F13995403: D8988.diff
Wed, Oct 23, 12:36 PM
F13971744: D8988.diff
Thu, Oct 17, 3:06 PM
F13971723: D8988.id.diff
Thu, Oct 17, 2:58 PM
F13971720: D8988.id21342.diff
Thu, Oct 17, 2:57 PM
F13971707: D8988.id21344.diff
Thu, Oct 17, 2:53 PM
F13971695: D8988.id21345.diff
Thu, Oct 17, 2:49 PM
F13971217: D8988.diff
Thu, Oct 17, 12:21 PM
Subscribers

Details

Summary

Provide bindings for JSONLint, which is a useful tool for linting and validating JSON. Theoretically, this could be done with pure PHP, however it would not be trivial (json_decode, for example, does not provide any context as to JSON validation errors).

Test Plan

Wrote and executed unit tests.

Diff Detail

Repository
rARC Arcanist
Branch
jsonlint
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 260
Build 260: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Add a JSON linter..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

Minor inlines, looks great in general.

src/lint/linter/ArcanistJSONLintLinter.php
15–27

We should drop this stuff for new linters and just return 'jsonlint';. In the long run I want to get all of this stuff out of .arcconfig. The two ways to set it will be:

  1. Use .arclint and specify it there.
  2. If you write your own engine, there will be some ->setFlagLikeThisCameFromArclint('bin', 'xyz') thing that we add, if I didn't already add that.
31–33

Probably a little cleaner to just list($err, $stdout) = execx_manual(...) -- that will also work on Windows.

62–63

Same deal here, toss the config.

This revision now requires changes to proceed.May 6 2014, 2:35 AM
joshuaspence edited edge metadata.

Toss away the .arcconfig stuff.

epriestley edited edge metadata.
This revision is now accepted and ready to land.May 6 2014, 3:15 AM
epriestley updated this revision to Diff 21345.

Closed by commit rARCab5c1562c0f6 (authored by @joshuaspence, committed by @epriestley).