util.json tests: Add [luacheck] annotation to mark intentionally-empty if branch
authorMatthew Wild <mwild1@gmail.com>
Mon, 17 Sep 2018 15:28:53 +0100
changeset 9329 c9c4b8bc53b1
parent 9328 982f8ae61de2
child 9330 f6f1dec164b5
util.json tests: Add [luacheck] annotation to mark intentionally-empty if branch
.luacheckrc
spec/util_json_spec.lua
--- a/.luacheckrc	Mon Sep 17 15:27:01 2018 +0100
+++ b/.luacheckrc	Mon Sep 17 15:28:53 2018 +0100
@@ -151,7 +151,6 @@
 	"spec/util_events_spec.lua";
 	"spec/util_http_spec.lua";
 	"spec/util_ip_spec.lua";
-	"spec/util_json_spec.lua";
 	"spec/util_multitable_spec.lua";
 	"spec/util_rfc6724_spec.lua";
 	"spec/util_throttle_spec.lua";
--- a/spec/util_json_spec.lua	Mon Sep 17 15:27:01 2018 +0100
+++ b/spec/util_json_spec.lua	Mon Sep 17 15:28:53 2018 +0100
@@ -42,7 +42,7 @@
 					local f = assert(io.open(path.."/"..name));
 					local content = assert(f:read("*a"));
 					assert(f:close());
-					if skip:find(name) then
+					if skip:find(name) then --luacheck: ignore 542
 						-- Skip
 					elseif name:match("^pass") then
 						valid_data[name] = content;