Skip to content

Commit f216df7

Browse files
committed
chore: fix luacheck offenses
1 parent 4922e4b commit f216df7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.luacheckrc

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
-- Use lua52 so we will no receive errors regarding to goto statements
2-
std = 'lua52+busted'
2+
std = "lua52+busted"
33

44
-- Rerun tests only if their modification time changed
55
cache = true
66

77
ignore = {
8-
'631', -- max_line_length
8+
"122", -- Setting a read-only field of a global variable
9+
"631", -- Line is too long
910
}
1011

1112
read_globals = {
12-
'vim',
13+
"vim",
1314
}
1415

1516
-- vim: ft=lua

lua/rest-nvim/functions.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function functions.exec(scope)
124124
result.write_res(result_buf, req_results)
125125

126126
-- Load the script variables
127-
if req_results.script ~= nil or not req_results.script == "" then
127+
if not (req_results.script == "" or req_results.script == nil) then
128128
script_vars.load(req_results.script, req_results)
129129
end
130130

lua/rest-nvim/result/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ local function format_body(bufnr, headers, res)
200200
end
201201

202202
-- Do not try to format binary content
203-
local body = {}
203+
local body
204204
if res_type == "octet-stream" then
205205
body = { "Binary answer" }
206206
else

0 commit comments

Comments
 (0)