luacheckrc: Only allow top level declarations in the main prosody executable
authorKim Alvefur <zash@zash.se>
Fri, 23 Mar 2018 13:13:07 +0100
changeset 8677 55807a2f5d23
parent 8676 6aeed79d9283
child 8678 d3d74e923e4e
luacheckrc: Only allow top level declarations in the main prosody executable
.luacheckrc
--- a/.luacheckrc	Thu Mar 22 22:35:39 2018 +0000
+++ b/.luacheckrc	Fri Mar 23 13:13:07 2018 +0100
@@ -1,5 +1,4 @@
 cache = true
-allow_defined_top = true
 unused_secondaries = false
 codes = true
 ignore = { "411/err", "421/err", "411/ok", "421/ok", "211/_ENV", "431/log" }
@@ -11,6 +10,10 @@
 	"hosts",
 	"import",
 };
+files["prosody"] = {
+	allow_defined_top = true;
+	module = true;
+}
 files["core/"] = {
 	globals = {
 		"prosody.hosts.?",
@@ -23,6 +26,7 @@
 }
 files["plugins/"] = {
 	module = true;
+	allow_defined_top = true;
 	read_globals = {
 		-- Module instance
 		"module.name",