chore: add linting to CI

This commit is contained in:
Steven Arcangeli 2021-11-20 12:26:08 -08:00
parent 3e9af72e6b
commit f17a5be6ca
2 changed files with 47 additions and 0 deletions

32
.github/workflows/lint.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Lint
on: [push, pull_request]
jobs:
luacheck:
name: Luacheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Prepare
run: |
sudo apt-get update
sudo add-apt-repository universe
sudo apt install luarocks -y
sudo luarocks install luacheck
- name: Run Luacheck
run: luacheck .
stylua:
name: StyLua
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Stylua
uses: JohnnyMorganz/stylua-action@1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --check .

View file

@ -1 +1,16 @@
max_comment_line_length = false
codes = true
exclude_files = {
"tests/",
}
ignore = {
"212", -- Unused argument
"631", -- Line is too long
"122", -- Setting a readonly global
}
read_globals = {
"vim",
}