bgamari / arcanist-external-json-linter

An Arcanist extension for writing external linters providing JSON-serialized violation messages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arcanist-external-json-linter

This is an Arcanist extension providing a mechanism for implementing external Linter tools. The extension allows linter tools to emit JSON-serialized violation messages to standard output. See Phabricator T9827 for the original motivation behind this extension.

Installation

First add this repository as a submodule of the project,

$ git submodule add https://github.com/bgamari/arcanist-external-json-linter.git .arcanist-external-json-linter
$ git submodule update --init

Then load the extension in .arcconfig,

{
  "project_id": "my-awesome-project",
  "conduit_uri": "https://example.org",

  "load": [
    ".arcanist-external-json-linter"
  ]
}

Usage

Add a linter to .arclint,

{
  "linters": {
    "my-linter": {
      "type": "external-json",
      "external-json.script": "python .arc-linters/check-binaries.py $1"
    }
  }
}

About

An Arcanist extension for writing external linters providing JSON-serialized violation messages


Languages

Language:PHP 100.0%