2
0

.luacheckrc 1.4 KB

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