Diff

.luacheckrc @ 2597:805fa6ca062b

luacheckrc: List all module API methods (reqires luacheck 1.19)
author Kim Alvefur <zash@zash.se>
date Mon, 06 Mar 2017 00:43:06 +0100
parent 1998:7c16e0199a06
child 2598:d9022fe9749c
line wrap: on
line diff
--- a/.luacheckrc	Sun Mar 05 20:23:53 2017 +0100
+++ b/.luacheckrc	Mon Mar 06 00:43:06 2017 +0100
@@ -1,8 +1,59 @@
 cache = true
-read_globals = { "prosody", "hosts", "import" }
+read_globals = {
+	"prosody",
+	"hosts",
+	"import",
+
+	-- Module API
+	"module.add_extension",
+	"module.add_feature",
+	"module.add_identity",
+	"module.add_item",
+	"module.add_timer",
+	"module.broadcast",
+	"module.context",
+	"module.depends",
+	"module.fire_event",
+	"module.get_directory",
+	"module.get_host",
+	"module.get_host_items",
+	"module.get_host_type",
+	"module.get_name",
+	"module.get_option",
+	"module.get_option_array",
+	"module.get_option_boolean",
+	"module.get_option_inherited_set",
+	"module.get_option_number",
+	"module.get_option_path",
+	"module.get_option_set",
+	"module.get_option_string",
+	"module.handle_items",
+	"module.has_feature",
+	"module.has_identity",
+	"module.hook",
+	"module.hook_global",
+	"module.hook_object_event",
+	"module.hook_tag",
+	"module.load_resource",
+	"module.measure",
+	"module.measure_event",
+	"module.measure_global_event",
+	"module.measure_object_event",
+	"module.open_store",
+	"module.provides",
+	"module.remove_item",
+	"module.require",
+	"module.send",
+	"module.set_global",
+	"module.shared",
+	"module.unhook",
+	"module.unhook_object_event",
+	"module.wrap_event",
+	"module.wrap_global",
+	"module.wrap_object_event",
+}
 globals = { "_M" }
 allow_defined_top = true
-module = true
 unused_secondaries = false
 codes = true
-ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "122/module" };
+ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV" };