mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
chore: add linting to CI
This commit is contained in:
parent
3e9af72e6b
commit
f17a5be6ca
2 changed files with 47 additions and 0 deletions
32
.github/workflows/lint.yml
vendored
Normal file
32
.github/workflows/lint.yml
vendored
Normal 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 .
|
||||
|
15
.luacheckrc
15
.luacheckrc
|
@ -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",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue