-
Notifications
You must be signed in to change notification settings - Fork 5
/
.luacheckrc
69 lines (69 loc) · 1.77 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
std = "min+sile"
include_files = {
"**/*.lua",
"*.rockspec",
".busted",
".luacheckrc"
}
exclude_files = {
"lua_modules",
".lua",
".luarocks",
".install"
}
globals = {
-- acceptable as SILE has the necessary compatibility shims:
-- pl.utils.unpack provides extra functionality and nil handling
-- but our modules shouldn't be using that anyway.
"table.unpack"
}
files["**/*_spec.lua"] = {
std = "+busted"
}
-- Vendored libraries with our modifications and/or extensions:
-- We want to ensure a minimal level of decent linting on these files
-- in order to avoid the worst mistakes when modifying them.
files["lua-libraries/lunamark"] = {
globals = {
-- used in compatibility shims and feature detection
"loadstring",
"setfenv",
"unpack",
"utf8",
},
}
files["lua-libraries/djot.lua"] = {
globals = {
-- used in compatibility shims and feature detection
"unpack",
},
ignore = {
-- -- matter of taste and not harmful
"211", -- unused function / unused variable
"212", -- unused argument
}
}
files["lua-libraries/djot"] = {
globals = {
-- used in compatibility shims and feature detection
"loadstring",
"unpack",
"utf8",
},
ignore = {
-- usually bad but used in compatibility shims...
"121", -- setting a read-only global variable
-- usually questionable but weird use in constructors...
"312", -- value of argument self is overwritten before use
-- matter of taste and not harmful
"211", -- unused function / unused variable
"212", -- unused argument
"213", -- unused loop variable
}
}
max_line_length = false
ignore = {
"581", -- operator order warning doesn't account for custom table metamethods
"212/self", -- unused argument self: counterproductive warning
}
-- vim: ft=lua