.luacheckrc 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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", "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/misc_helpers.lua"] = {
  35. globals = {
  36. "dump", "dump2", "table", "math", "string",
  37. "fgettext", "fgettext_ne", "basic_dump", "game", -- ???
  38. "file_exists", "get_last_folder", "cleanup_path", -- ???
  39. },
  40. }
  41. files["builtin/common/vector.lua"] = {
  42. globals = { "vector" },
  43. }
  44. files["builtin/game/voxelarea.lua"] = {
  45. globals = { "VoxelArea" },
  46. }
  47. files["builtin/game/init.lua"] = {
  48. globals = { "profiler" },
  49. }
  50. files["builtin/common/filterlist.lua"] = {
  51. globals = {
  52. "filterlist",
  53. "compare_worlds", "sort_worlds_alphabetic", "sort_mod_list", -- ???
  54. },
  55. }
  56. files["builtin/mainmenu"] = {
  57. globals = {
  58. "gamedata",
  59. },
  60. read_globals = {
  61. "PLATFORM",
  62. },
  63. }
  64. files["builtin/common/tests"] = {
  65. read_globals = {
  66. "describe",
  67. "it",
  68. "assert",
  69. },
  70. }