.luacheckrc 1.5 KB

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