Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add luacheck to check builtin (#7895)
- Loading branch information
1 parent
8da35c2
commit 8e75785
Showing
24 changed files
with
201 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
unused_args = false | ||
allow_defined_top = true | ||
|
||
ignore = { | ||
"131", -- Unused global variable | ||
"431", -- Shadowing an upvalue | ||
"432", -- Shadowing an upvalue argument | ||
} | ||
|
||
read_globals = { | ||
"ItemStack", | ||
"INIT", | ||
"DIR_DELIM", | ||
"dump", "dump2", | ||
"fgettext", "fgettext_ne", | ||
"vector", | ||
"VoxelArea", | ||
"profiler", | ||
"Settings", | ||
|
||
string = {fields = {"split"}}, | ||
table = {fields = {"copy", "getn", "indexof", "insert_all"}}, | ||
math = {fields = {"hypot"}}, | ||
} | ||
|
||
globals = { | ||
"core", | ||
"gamedata", | ||
os = { fields = { "tempfolder" } }, | ||
"_", | ||
} | ||
|
||
files["builtin/client/register.lua"] = { | ||
globals = { | ||
debug = {fields={"getinfo"}}, | ||
} | ||
} | ||
|
||
files["builtin/common/misc_helpers.lua"] = { | ||
globals = { | ||
"dump", "dump2", "table", "math", "string", | ||
"fgettext", "fgettext_ne", "basic_dump", "game", -- ??? | ||
"file_exists", "get_last_folder", "cleanup_path", -- ??? | ||
}, | ||
} | ||
|
||
files["builtin/common/vector.lua"] = { | ||
globals = { "vector" }, | ||
} | ||
|
||
files["builtin/game/voxelarea.lua"] = { | ||
globals = { "VoxelArea" }, | ||
} | ||
|
||
files["builtin/game/init.lua"] = { | ||
globals = { "profiler" }, | ||
} | ||
|
||
files["builtin/common/filterlist.lua"] = { | ||
globals = { | ||
"filterlist", | ||
"compare_worlds", "sort_worlds_alphabetic", "sort_mod_list", -- ??? | ||
}, | ||
} | ||
|
||
files["builtin/mainmenu"] = { | ||
globals = { | ||
"gamedata", | ||
}, | ||
|
||
read_globals = { | ||
"PLATFORM", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.