Skip to content
This repository was archived by the owner on Jan 17, 2024. It is now read-only.

Commit 3e48265

Browse files
committed
Add CI
1 parent 711ea5a commit 3e48265

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/luacheck.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Linting and style checking
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
luacheck:
7+
name: Luacheck
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
12+
- name: Prepare
13+
run: |
14+
sudo apt-get update
15+
sudo add-apt-repository universe
16+
sudo apt install luarocks -y
17+
sudo luarocks install luacheck
18+
19+
- name: Run Luacheck
20+
run: sudo ./scripts/style-check.sh

.luacheckrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-- Rerun tests only if their modification time changed.
2+
cache = true
3+
4+
-- Glorious list of warnings: https://luacheck.readthedocs.io/en/stable/warnings.html
5+
ignore = {
6+
"212", -- Unused argument, In the case of callback function, _arg_name is easier to understand than _, so this option is set to off.
7+
"411", -- Redefining a local variable.
8+
"412", -- Redefining an argument.
9+
"422", -- Shadowing an argument
10+
"431", -- Shadowing a variable
11+
"122" -- Indirectly setting a readonly global
12+
}
13+
14+
-- Global objects defined by the C code
15+
read_globals = {
16+
"vim",
17+
}

0 commit comments

Comments
 (0)