.luacheckrc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. "PerlinNoise", "PerlinNoiseMap",
  19. string = {fields = {"split", "trim"}},
  20. table = {fields = {"copy", "getn", "indexof", "keyof", "insert_all"}},
  21. math = {fields = {"hypot", "round"}},
  22. }
  23. globals = {
  24. "core",
  25. "gamedata",
  26. os = { fields = { "tempfolder" } },
  27. "_",
  28. }
  29. files["builtin/client/register.lua"] = {
  30. globals = {
  31. debug = {fields={"getinfo"}},
  32. }
  33. }
  34. files["builtin/common/math.lua"] = {
  35. globals = {
  36. "math",
  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. files["builtin/common/vector.lua"] = {
  47. globals = { "vector", "math" },
  48. }
  49. files["builtin/game/voxelarea.lua"] = {
  50. globals = { "VoxelArea" },
  51. }
  52. files["builtin/game/init.lua"] = {
  53. globals = { "profiler" },
  54. }
  55. files["builtin/common/filterlist.lua"] = {
  56. globals = {
  57. "filterlist",
  58. "compare_worlds", "sort_worlds_alphabetic", "sort_mod_list", -- ???
  59. },
  60. }
  61. files["builtin/mainmenu"] = {
  62. globals = {
  63. "gamedata",
  64. },
  65. read_globals = {
  66. "PLATFORM",
  67. },
  68. }
  69. files["builtin/common/tests"] = {
  70. read_globals = {
  71. "describe",
  72. "it",
  73. "assert",
  74. },
  75. }