forked from GoatG33k/fivem-lua-lint-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.luacheckrc.template
115 lines (110 loc) · 3.08 KB
/
.luacheckrc.template
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
stds.cfx = {
read_globals = {
Citizen = {
fields = {
"Wait", "CreateThread", "SetTimeout", "Await", "Trace",
"InvokeNative"
}
},
exports = { other_fields = true },
GlobalState = { other_fields = true },
"Player",
"Vehicle",
"Wait",
"CreateThread",
"SetTimeout",
"Await",
"Trace",
"quat",
"vec",
"vector2", "vec2",
"vector3", "vec3",
"vector4", "vec4",
"AddEventHandler",
"RegisterNetEvent",
"TriggerEvent",
"RemoveEventHandler",
json = { fields = {"encode", "decode"} },
%%SHARED_GLOBALS%%
}
}
stds.cfx_sv = {
globals = {"GlobalState"},
read_globals = {
"source",
"Entity",
"MySQL",
"Player",
"TriggerClientEvent",
"TriggerLatentClientEvent",
"RegisterServerEvent",
"GetPlayerIdentifiers",
"GetPlayers",
"PerformHttpRequest",
"CreateVehicle",
%%SERVER_GLOBALS%%
}
}
stds.cfx_cl = {
read_globals = {
"TriggerServerEvent",
"RegisterNUICallback",
"SendNUIMessage",
"GlobalState",
%%CLIENT_GLOBALS%%
}
}
stds.cfx_manifest = {
read_globals = {
"author", "description", "repository", "version",
"rdr3_warning", "fx_version",
"games", "game", "authors", "author",
"server_scripts", "server_script",
"client_scripts", "client_script",
"shared_scripts", "shared_script",
"ui_page", "files", "file",
"export", "exports", "replace_level_meta",
"data_file", "this_is_a_map", "server_only",
"loadscreen", "dependency", "dependencies",
"provide", "lua54", "disable_lazy_natives",
"clr_disable_task_scheduler", "my_data",
"ui_page_preload", "loadscreen_manual_shutdown",
},
}
stds.esx_legacy = {
read_globals = {
MySQL = {
fields = {
"ready",
"insert",
"update",
"scalar",
"single",
"prepare",
"query",
}
}
}
}
-- manifest
files["**/fxmanifest.lua"].std = "max+cfx_manifest"
files["**/__resource.lua"].std = "max+cfx_manifest"
files["**/fxmanifest.lua"].ignore = {'113', '611', '111', '614'}
files["**/__resource.lua"].ignore = {'113', '611', '111', '614'}
-- clients
files["**/client.lua"].std = "max+cfx+cfx_cl%%EXTRA%%"
files["**/cl_*.lua"].std = "max+cfx+cfx_cl%%EXTRA%%"
files["**/client/**/*.lua"].std = "max+cfx+cfx_cl%%EXTRA%%"
-- server
files["**/server.lua"].std = "max+cfx+cfx_sv%%EXTRA%%"
files["**/sv_*.lua"].std = "max+cfx+cfx_sv%%EXTRA%%"
files["**/server/**/*.lua"].std = "max+cfx+cfx_sv%%EXTRA%%"
-- shared
files["**/shared.lua"].std="max+cfx+cfx_sv+cfx_cl%%EXTRA%%"
files["**/shared/**/*.lua"].std="max+cfx+cfx_sv+cfx_cl%%EXTRA%%"
-- default
max_line_length = 140
max_cyclomatic_complexity = 100
color = true
ignore = {'611', '111', '614'}
std = "max+cfx+cfx_sv+cfx_cl%%EXTRA%%"