From 54f81b774059cff39d085a602add534b4cf83e90 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 15 Apr 2021 14:19:11 +0200 Subject: [PATCH 1/2] add basic .luacheckrc file --- .luacheckrc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .luacheckrc diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000000..55ad4cd5ea --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,35 @@ +read_globals = { + "DIR_DELIM", + "minetest", "core", + "dump", "dump2", + "vector", + "VoxelManip", "VoxelArea", + "PseudoRandom", "PcgRandom", + "ItemStack", + "Settings", + "unpack", + + table = { + fields = { + "copy", + "indexof", + "insert_all", + "key_value_swap", + } + }, + + string = { + fields = { + "split", + "trim", + } + }, + + math = { + fields = { + "hypot", + "sign", + "factorial" + } + }, +} \ No newline at end of file From d865d95639b2965ad1908036041382e848fe3753 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 15 Apr 2021 14:26:12 +0200 Subject: [PATCH 2/2] update config --- .luacheckrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.luacheckrc b/.luacheckrc index 55ad4cd5ea..01d71d6dfd 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,6 +1,13 @@ +unused_args = false +allow_defined_top = true +max_line_length = 125 + +globals = { + "minetest", "core", +} + read_globals = { "DIR_DELIM", - "minetest", "core", "dump", "dump2", "vector", "VoxelManip", "VoxelArea",