Repository navigation
Expand file tree
/
Copy path.luacheckrc
More file actions
115 lines (101 loc) · 2.32 KB
/
Copy path.luacheckrc
File metadata and controls
115 lines (101 loc) · 2.32 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
std = "wow_mmg"
function deepcopy(orig)
local orig_type = type(orig)
local copy
if orig_type == 'table' then
copy = {}
for orig_key, orig_value in next, orig, nil do
copy[deepcopy(orig_key)] = deepcopy(orig_value)
end
setmetatable(copy, deepcopy(getmetatable(orig)))
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function merge_tables(...)
result = {}
for i, t in ipairs{...} do
assert(type(t) == "table")
for k, v in pairs(t) do
print(k,v)
if type(k) == "number" then
table.insert(result, v)
elseif type(v) == "table" then
result[k] = deepcopy(v)
else
result[k] = v
end
end
end
return result
end
max_line_length = false
exclude_files = {
".luacheckrc"
}
ignore = {
"11./SLASH_.*", -- Setting an undefined (Slash handler) global variable
--"11./BINDING_.*", -- Setting an undefined (Keybinding header) global variable
--"113/LE_.*", -- Accessing an undefined (Lua ENUM type) global variable
--"113/NUM_LE_.*", -- Accessing an undefined (Lua ENUM type) global variable
--"211", -- Unused local variable
--"211/L", -- Unused local variable "L"
--"211/CL", -- Unused local variable "CL"
--"212", -- Unused argument
--"213", -- Unused loop variable
-- "231", -- Set but never accessed
--"311", -- Value assigned to a local variable is unused
--"314", -- Value of a field in a table literal is unused
--"42.", -- Shadowing a local variable, an argument, a loop variable.
--"43.", -- Shadowing an upvalue, an upvalue argument, an upvalue loop variable.
--"542", -- An empty if branch
"211/_.*",
"212/_.*",
"213/_.*",
}
_checkbox_fields = {
"Disable",
"Enable",
"SetChecked",
"SetShown",
}
_text_fields = {
"GetFontObject",
"SetText",
"SetTextColor",
}
read_globals = {
}
globals = {
"_G",
"SlashCmdList",
"LibStub",
"CONFIGMODE_CALLBACKS",
--Autobar Globals
"AutoBar",
"AutoBarDB2",
"AutoBarGlobalCodeSpace",
"AutoBarGlobalDataObject",
"AutoBarButton",
"AutoBarCategory",
"AutoBarCategoryList",
"AutoBarSearch",
MUFFIN_WHATS_NEW_QUEUE = {
fields = {
"AddEntry",
"AddConditionalEntry",
"body_text",
"frame",
"header_frame",
"header_text",
"ok_button",
"q",
"Show",
"show_whats_new_internal",
"StupidLog",
"StupidLogLine",
"version",
}
}
}