chore: add arclint config with a load of linters
Summary: Adds all the lint configs for arc to run before submitting changes. This is only used on the personal Phorge instance atm, it can be run with the `arc lint` command Test Plan: Creating a change will probably do it.
This commit is contained in:
parent
ea6727db40
commit
4449fd5b45
1 changed files with 46 additions and 0 deletions
46
.arclint
Normal file
46
.arclint
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
"linters": {
|
||||||
|
"stylua": {
|
||||||
|
"type": "script-and-regex",
|
||||||
|
"script-and-regex.script": "sh -c 'stylua --check \"$0\" || true'",
|
||||||
|
"script-and-regex.regex": "/(?P<line>\\d+).*\\|\\-/m",
|
||||||
|
"include": "(\\.lua$)"
|
||||||
|
},
|
||||||
|
"luacheck": {
|
||||||
|
"type": "script-and-regex",
|
||||||
|
"script-and-regex.script": "sh -c 'luacheck \"$0\" || true'",
|
||||||
|
"script-and-regex.regex": "/^.*?:(?P<line>\\d+):(?P<char>\\d+):\\s+\\((?P<code>\\w+)\\) (?P<message>.*?)$/m",
|
||||||
|
"include": "(\\.lua$)"
|
||||||
|
},
|
||||||
|
"cargo": {
|
||||||
|
"type": "script-and-regex",
|
||||||
|
"script-and-regex.script": "sh -c 'cargo fmt --check --'",
|
||||||
|
"script-and-regex.regex": "/(?P<message>.*?)/",
|
||||||
|
"include": "(\\.rs$)"
|
||||||
|
},
|
||||||
|
"clippy": {
|
||||||
|
"type": "script-and-regex",
|
||||||
|
"script-and-regex.script": "sh -c 'cargo clippy --'",
|
||||||
|
"script-and-regex.regex": "/(?P<message>.*?)/",
|
||||||
|
"include": "(\\.rs$)"
|
||||||
|
},
|
||||||
|
"prettier": {
|
||||||
|
"type": "script-and-regex",
|
||||||
|
"script-and-regex.script": "prettier --check",
|
||||||
|
"script-and-regex.regex": "/(?P<message>.*?)/",
|
||||||
|
"include": "(\\.yml$|\\.json[c5]?$|\\.[tj]sx?$)"
|
||||||
|
},
|
||||||
|
"merge-conflict": {
|
||||||
|
"type": "merge-conflict"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
"chmod": {
|
||||||
|
"type": "chmod"
|
||||||
|
},
|
||||||
|
"generated": {
|
||||||
|
"type": "generated"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue