-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.luacheckrc
61 lines (52 loc) · 1.27 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
-- vim: ft=lua tw=80
---@diagnostic disable
-- luacheck: ignore 111 112
--# selene: allow(unused_variable,unscoped_variables,undefined_variable)
stds.nvim = {
read_globals = { "jit" },
}
std = "lua51+nvim"
-- Ignore W211 (unused variable) with preload files.
-- files["**/preload.lua"] = { ignore = { "211" } }
-- Allow vim module to modify itself, but only here.
-- files["src/nvim/lua/vim.lua"] = { ignore = { "122/vim" } }
-- Don't report unused self arguments of methods.
self = false
-- Rerun tests only if their modification time changed.
cache = true
ignore = {
"631", -- max_line_length
"212/_.*", -- unused argument, for vars with "_" prefix
"214", -- used variable with unused hint ("_" prefix)
"121", -- setting read-only global variable "vim"
"122", -- setting read-only field of global variable "vim"
"581", -- negation of a relational operator- operator can be flipped (not for tables)
}
-- Global objects defined by the C code
read_globals = {
"vim",
}
globals = {
"vim.g",
"vim.b",
"vim.w",
"vim.o",
"vim.bo",
"vim.wo",
"vim.go",
"vim.env",
}
files = {
["tests/**/*_spec.lua"] = {
globals = {
"describe",
"it",
"pending",
"before_each",
"after_each",
"clear",
"assert",
"print",
},
},
}