Highlight code-blocks and display literal names in monospace

John Gardner
2021-12-22 16:12:42 +11:00
parent b41ead76cc
commit 5dd53489e0

@@ -2,37 +2,43 @@
The default path for libraries extending Phabricator and Arcanist is at the same level as Phabricator or Arcanist folders: The default path for libraries extending Phabricator and Arcanist is at the same level as Phabricator or Arcanist folders:
$ cd /path/to/arcanist ```console
$ cd .. $ cd /path/to/arcanist
$ git clone https://github.com/dereckson/shellcheck-linter.git $ cd ..
$ git clone https://github.com/dereckson/shellcheck-linter.git
```
## Configuration to load the linter ### Configuration to load the linter
When you need to use this plugin in a project, in your .arcconfig file, add a load block, for example: When you need to use this plugin in a project, in your `.arcconfig` file, add a load block, for example:
{ ```json
"phabricator.uri": "https://devcentral.nasqueron.org/", {
"repository.callsign": "OPS", "phabricator.uri": "https://devcentral.nasqueron.org/",
"load": [ "repository.callsign": "OPS",
"shellcheck-linter" "load": [
] "shellcheck-linter"
} ]
}
```
The load array is a collection of strings, and each string match a folder name to load. The `load` array is a collection of strings, and each string match a folder name to load.
## Configuration for .arclint ### Configuration for `.arclint`
Provide a block with the shellcheck linter type and the patterns you wish to lint. Provide a block with the `"shellcheck"` linter type and the patterns you wish to lint.
For example to lint all .sh files: For example to lint all `.sh` files:
{ ```json
"linters": { {
"shell": { "linters": {
"type": "shellcheck", "shell": {
"include": [ "type": "shellcheck",
"(\\.sh$)" "include": [
] "(\\.sh$)"
}, ]
} }
} }
}
```