Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/userguide/arcanist_lint.diviner
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | "sample": { | ||||
"E221": "disabled", | "E221": "disabled", | ||||
"E401": "warning" | "E401": "warning" | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
``` | ``` | ||||
Here, the lint message "E221" (which is "multiple spaces before operator") is | Here, the lint message `E221` (which is "multiple spaces before operator") is | ||||
disabled, so it won't be shown. The message "E401" (which is "multiple imports | disabled, so it won't be shown. The message `E401` (which is "multiple imports | ||||
on one line") is set to "warning" severity. | on one line") is set to "warning" severity. | ||||
For linters that extend `ArcanistLinter`, such as the [[ | |||||
https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/linter/ | |||||
ArcanistTextLinter.php | text ]] linter, the severity map keys coorespond to | |||||
the numerical values at the top of the file instead of the names of the error. | |||||
```lang=js | |||||
{ | |||||
"linters": { | |||||
"sample": { | |||||
"type": "text", | |||||
"severity": { | |||||
"3": "disabled" | |||||
} | |||||
} | |||||
} | |||||
} | |||||
``` | |||||
Here, the lint message `TXT3` (which is line too long) is disabled. | |||||
If you want to remap a large number of messages, you can use `severity.rules` | If you want to remap a large number of messages, you can use `severity.rules` | ||||
and specify regular expressions: | and specify regular expressions: | ||||
```lang=js | ```lang=js | ||||
{ | { | ||||
"linters": { | "linters": { | ||||
"sample": { | "sample": { | ||||
"type": "pep8", | "type": "pep8", | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |