summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Melnichenko <mpeterval@gmail.com>2016-06-29 12:52:27 +0300
committerPeter Melnichenko <mpeterval@gmail.com>2016-06-29 12:52:27 +0300
commit505b9dbd5bd9f5c7ab33dc14e590279f601652fb (patch)
tree39335212cacbd4c77a5ed94af55eab571dbcffed
parent3ec7bcfa595c22d55b564da9213affc9aee78b0e (diff)
downloadluacov-505b9dbd5bd9f5c7ab33dc14e590279f601652fb.tar.bz2
.luacheckrc: change `std` to minimal, fix warnings
-rw-r--r--.luacheckrc2
-rw-r--r--src/luacov/util.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/.luacheckrc b/.luacheckrc
index 0030d5c..c0ce47b 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -1,2 +1,2 @@
-std = "max"
+std = "min"
exclude_files = {"tests/*/*"}
diff --git a/src/luacov/util.lua b/src/luacov/util.lua
index 9f8e6f9..c4a4d3d 100644
--- a/src/luacov/util.lua
+++ b/src/luacov/util.lua
@@ -41,19 +41,19 @@ end
-- @param[opt] chunkname chunk name.
function util.load_string(str, env, chunkname)
if _VERSION:find("5%.1") then
- local func, err = loadstring(str, chunkname)
+ local func, err = loadstring(str, chunkname) -- luacheck: compat
if not func then
return nil, err
end
if env then
- setfenv(func, env)
+ setfenv(func, env) -- luacheck: compat
end
return func
else
- return load(str, chunkname, "bt", env or _ENV)
+ return load(str, chunkname, "bt", env or _ENV) -- luacheck: compat
end
end