Fix build error on Ubuntu 16.04 (again)
[oweals/minetest.git] / .luacheckrc
1 unused_args = false
2 allow_defined_top = true
3
4 ignore = {
5         "131", -- Unused global variable
6         "431", -- Shadowing an upvalue
7         "432", -- Shadowing an upvalue argument
8 }
9
10 read_globals = {
11         "ItemStack",
12         "INIT",
13         "DIR_DELIM",
14         "dump", "dump2",
15         "fgettext", "fgettext_ne",
16         "vector",
17         "VoxelArea",
18         "profiler",
19         "Settings",
20
21         string = {fields = {"split", "trim"}},
22         table  = {fields = {"copy", "getn", "indexof", "insert_all"}},
23         math   = {fields = {"hypot"}},
24 }
25
26 globals = {
27         "core",
28         "gamedata",
29         os = { fields = { "tempfolder" } },
30         "_",
31 }
32
33 files["builtin/client/register.lua"] = {
34         globals = {
35                 debug = {fields={"getinfo"}},
36         }
37 }
38
39 files["builtin/common/misc_helpers.lua"] = {
40         globals = {
41                 "dump", "dump2", "table", "math", "string",
42                 "fgettext", "fgettext_ne", "basic_dump", "game", -- ???
43                 "file_exists", "get_last_folder", "cleanup_path", -- ???
44         },
45 }
46
47 files["builtin/common/vector.lua"] = {
48         globals = { "vector" },
49 }
50
51 files["builtin/game/voxelarea.lua"] = {
52         globals = { "VoxelArea" },
53 }
54
55 files["builtin/game/init.lua"] = {
56         globals = { "profiler" },
57 }
58
59 files["builtin/common/filterlist.lua"] = {
60         globals = {
61                 "filterlist",
62                 "compare_worlds", "sort_worlds_alphabetic", "sort_mod_list", -- ???
63         },
64 }
65
66 files["builtin/mainmenu"] = {
67         globals = {
68                 "gamedata",
69         },
70
71         read_globals = {
72                 "PLATFORM",
73         },
74 }