Compare commits

..

2 commits

Author SHA1 Message Date
50937a342f WIP: try and run with npx
Summary:

Test Plan:
2024-09-03 17:49:34 +01:00
4449fd5b45 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.
2024-07-24 22:23:47 +01:00
2 changed files with 47 additions and 5 deletions

46
.arclint Normal file
View 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"
}
}
}

View file

@ -29,11 +29,7 @@ jobs:
uses: actions/checkout@v4
- name: Run stylua
uses: JohnnyMorganz/stylua-action@v4.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
run: npx @johnnymorganz/stylua-bin --check .
cargo-format:
name: Cargo Format