From e20a5a4e09703aa53c7aa47c3caf9f7cafdb980c Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 26 May 2024 15:37:06 +0200 Subject: [PATCH] Teach LuaCheck about vector.* fields --- .luacheckrc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 23262c7..76e0696 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,9 +1,17 @@ -read_globals = {"minetest", "vector", "VoxelArea", "ItemStack", - "table", +read_globals = { + "minetest", "VoxelArea", "ItemStack", "unified_inventory", "sfinv", "smart_inventory", "inventory_plus", - "dump" + "dump", + + table = {fields = {"copy", "indexof", "insert_all"}}, + vector = {fields = { + -- as of 5.0 + "new", "direction", "distance", "length", "normalize", "floor", "round", + "apply", "equals", "sort", "add", "subtract", "multiply", "divide" + }}, } globals = {"worldedit"} + -- Ignore these errors until someone decides to fix them ignore = {"212", "213", "411", "412", "421", "422", "431", "432", "631"}