-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.luacheckrc
More file actions
90 lines (83 loc) · 2.7 KB
/
Copy path.luacheckrc
File metadata and controls
90 lines (83 loc) · 2.7 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
-- .luacheckrc — CTLD project
-- Target runtime: DCS World (Lua 5.1 strict)
-- Run: luacheck src/ tests/ CTLD.lua
std = "lua51"
-- Lua 5.2+ constructs are not available in DCS (Lua 5.1)
-- luacheck will warn on goto, <const>, <close>, table.move, math.type, utf8.*
-- Note: goto itself is a Lua 5.2+ keyword — luacheck's lua51 std already rejects it.
max_line_length = 200
unused_args = false -- many DCS callbacks receive args not always used
self = false -- OOP methods use self implicitly
-- Files / directories to ignore
exclude_files = {
"source/**", -- legacy source, never modified
"tools/**",
}
-- DCS World API globals (all read-only from script perspective)
read_globals = {
-- DCS singleton namespaces
"env", "world", "coalition", "country", "timer", "trigger",
"land", "atmosphere", "coord", "radio", "spot", "missionCommands",
-- DCS object constructors / class tables
"Unit", "Group", "StaticObject", "Airbase", "Object", "Controller",
"Weapon", "Runway", "Warehouse",
-- DCS utility globals
"dcsCommon", "mist",
-- Lua 5.1 stdlib present in DCS but not in luacheck min std
"require", "dofile", "loadfile", "loadstring",
-- io / os present in DCS sandboxed environment
"io", "os",
}
-- CTLD globals defined across src/ files (writable — they are defined here)
globals = {
-- Core namespace
"ctld",
-- Config
"CTLDConfig",
-- i18n
"CTLDi18n",
-- Utils / infrastructure
"EventDispatcher",
"CTLDObjectRegistry",
"CTLDTypeCollector",
"CTLDParachuteEffect",
"CTLDNullParachuteEffect",
-- Domain classes
"CTLDCrate",
"CTLDCrateManager",
"CTLDCrateAssemblyManager",
"CTLDTroopGroup",
"CTLDTroopManager",
"CTLDVehicle",
"CTLDVehicleSpawner",
"CTLDFOB",
"CTLDFOBManager",
"CTLDBeacon",
"CTLDBeaconManager",
"CTLDReconRenderer",
"CTLDReconManager",
"CTLDZoneManager",
"CTLDLogisticZone",
"CTLDTroopZone",
"CTLDSceneManager",
"CtldScene",
"CTLDPlayer",
"CTLDPlayerTracker",
"CTLDPlayerManager",
"CTLDJTAC",
"CTLDJTACDetector",
"CTLDJTACMessage",
"CTLDJTACManager",
"CTLDSmokeManager",
"CTLDStaticWatcher",
"CTLDDCSEventBridge",
"CTLDCoreManager",
}
-- Per-file overrides
files["tests/"] = {
-- Test helpers may use additional globals. `_CTLD_assetCheck` / `_CTLD_STOCK_TYPES` come from
-- the dev-time companion (tools/companion/, itself excluded from luacheck) exercised by its spec.
globals = { "describe", "it", "setup", "teardown", "before_each", "after_each",
"assert", "spy", "mock", "stub",
"ctld_test", "_CTLD_assetCheck", "_CTLD_STOCK_TYPES" },
}