Skip to content

Commit ebe4521

Browse files
authored
Merge pull request #33 from Seadragon91/luacheck
Added luacheck config file, install luacheck and run it
2 parents e4bcbf2 + c6c846c commit ebe4521

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.luacheckrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-- This file is the config file for the tool named Luacheck
2+
-- Documentation: http://luacheck.readthedocs.io/en/stable/index.html
3+
4+
-- Ignore unused function and loop arguments
5+
unused_args = false
6+
7+
-- Allow self defined globals
8+
allow_defined = true
9+
10+
-- Ignore files / directories
11+
exclude_files =
12+
{
13+
"tests/", -- CuberitePluginChecker
14+
}
15+
16+
-- Ignore variables, warning codes
17+
ignore =
18+
{
19+
"113", -- Accessing an undefined global variable.
20+
"211", -- Unused local variable.
21+
"421", -- Shadowing a local variable.
22+
"432", -- Shadowing an upvalue argument.
23+
"511", -- Unreachable code.
24+
}

circle.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- sudo luarocks install lsqlite3
1010
- sudo luarocks install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
1111
- sudo luarocks install luasocket
12+
- sudo luarocks install luacheck
1213
- git clone --depth=1 https://github.com/cuberite/gallery ~/Gallery
1314
- wget -O ~/InfoReg.lua https://raw.githubusercontent.com/cuberite/cuberite/master/Server/Plugins/InfoReg.lua
1415
- mkdir ~/AutoAPI
@@ -20,3 +21,4 @@ dependencies:
2021
test:
2122
override:
2223
- lua CuberitePluginChecker.lua -p ~/Gallery -a ~/AutoAPI -e ~/ManualAPI.lua -i APIImpl/All.lua -s tests/Gallery/FuzzCommands.lua
24+
- luacheck -q .

0 commit comments

Comments
 (0)