-
Notifications
You must be signed in to change notification settings - Fork 0
/
.luacheckrc
73 lines (57 loc) · 1.48 KB
/
.luacheckrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- -*- mode: lua; -*- vim: set syntax=lua:
-- https://github.com/mpeterv/luacheck/blob/master/src/luacheck/builtin_standards.lua
std = 'luajit'
-- Ignore libs as we aren't accountable for those
exclude_files = { 'lib/*.*' }
-- Ignore all global variable references to love
files['**/*.lua'] = {
globals = {
'love'
}
}
-- Ignore busted spec file globals
local busted_globals = {
'after_each',
'assert',
'before_each',
'describe',
'match',
'mock',
'stub',
'spy',
'it'
}
files['*.spec.lua'] = {
globals = busted_globals
}
files['**/*.spec.lua'] = {
globals = busted_globals
}
-- List of allowed globals
globals = {}
-- false, don't allow something to be defined (??)
allow_defined = false
-- false, don't allow something to be defined on top (??)
allow_defined_top = false
-- true, enable color on command line
color = true
-- true, enable error codes on command line
-- http://luacheck.readthedocs.org/en/stable/warnings.html
codes = true
-- true, don't allow globals
global = true
-- 1, concurrent checks (requires lualanes)
-- https://github.com/LuaLanes/lanes
jobs = 1
-- true, don't allow variables to be shadowed
redefined = true
-- maximum characters per line allower before throw an error
max_line_length = 120
-- true, don't allow use of the deprecated module function
module = true
-- true, don't allow unused variable
unused = true
-- true, don't allow unused arguments
unused_args = true
-- true, don't allow unused secondary variables
unused_secondaries = true