2
0

.luacheckrc 1.5 KB

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