-
Notifications
You must be signed in to change notification settings - Fork 22
/
.luacheckrc
98 lines (87 loc) · 2.35 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
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
std = "lua53"
max_line_length = false -- May enable later. Have too many lines with 150+ symbols in existing code
-- These global variables are allowed.
globals = {
"loti", -- All non-local LotI functions are placed here, e.g. loti.item.on_unit.list()
"crafting", -- Non-local state of Crafting dialog
"T", -- Shortcut for wml.tag,
-- FIXME: these globals should be moved somewhere within loti[] array
"damage_type_list",
"melee_type_list",
"ranged_type_list",
"resist_penetrate_descriptions",
"resist_penetrate_list",
"resist_type_descriptions",
"resist_type_list",
"sort_list",
"weapon_type_list"
}
-- These global variables are allowed, but can't be modified (with the exception of some fields).
read_globals = {
wml = {
fields = {
-- wml.variables[something] is supposed to be modified
variables = {
read_only = false,
other_fields = true
}
},
other_fields = true
},
"filesystem",
"gui",
"mathx",
wesnoth = {
fields = {
-- wesnoth.wml_actions[something] is supposed to be modified
wml_actions = {
read_only = false,
other_fields = true
},
-- wesnoth.effects[something] is supposed to be modified
effects = {
read_only = false,
other_fields = true
},
-- wesnoth.theme_units[something] is supposed to be modified
theme_items = {
read_only = false,
other_fields = true
},
-- wesnoth.sides[number] is supposed to be modified
sides = {
read_only = false,
other_fields = true
},
-- "wesnoth.interface.game_display.unit_status" is supposed to be modified
interface = {
fields = {
game_display = {
fields = {
unit_status = {
read_only = false,
other_fields = true
},
unit_abilities = {
read_only = false,
other_fields = true
}
},
other_fields = true
}
},
other_fields = true
},
-- Various utility/debug functions
deepcopy = { read_only = false },
dbms = { read_only = false },
loop_guard = { read_only = false },
-- FIXME: should probably rename wesnoth.update_stats into loti.update_stats
update_stats = { read_only = false }
},
other_fields = true
}
}
codes = true -- Show luacheck's error/warning codes. Useful for adding exceptions (see below).
-- Ignore "unused argument self" (W212) in mpsafety:constructor() and mpsafety:run_immediately().
self = false