.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. 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. "TOUCHSCREEN_GUI",
  62. },
  63. }
  64. files["builtin/common/tests"] = {
  65. read_globals = {
  66. "describe",
  67. "it",
  68. "assert",
  69. },
  70. }