-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html reporter not working #98
Comments
The reason is that the HTML reporter was added recently in #93 and a new version has not yet been released to LuaRocks. The version that I'm using (
Looks like this project is being transitioned to a new org, so the team is likely working on updating the release process. In order to use the latest version in the meantime, you will probably need to install the project manually. This might also be an option for generating HTML reports for now: |
Hello, I investigated for a bit on this issue. The rockspec file need to be updated to include the HTML reporter module. In addition, the static files from The best I could do was to copy the directory with luacov/src/luacov/reporter/html.lua Line 17 in c915f4b
In my case, after installing the module from Luarocks, it tries to read from Here is a quick path I have to allow the HTML reporter to work. It's no idea to have the directory hard codded like this... diff --git a/luacov-scm-1.rockspec b/luacov-scm-1.rockspec
index 4df09b3..1c9564a 100644
--- a/luacov-scm-1.rockspec
+++ b/luacov-scm-1.rockspec
@@ -28,6 +28,8 @@ build = {
["luacov.linescanner"] = "src/luacov/linescanner.lua",
["luacov.reporter"] = "src/luacov/reporter.lua",
["luacov.reporter.default"] = "src/luacov/reporter/default.lua",
+ ["luacov.reporter.html"] = "src/luacov/reporter/html.lua",
+ ["luacov.reporter.html.template"] = "src/luacov/reporter/html/template.lua",
["luacov.runner"] = "src/luacov/runner.lua",
["luacov.stats"] = "src/luacov/stats.lua",
["luacov.tick"] = "src/luacov/tick.lua",
@@ -36,6 +38,9 @@ build = {
install = {
bin = {
luacov = "src/bin/luacov"
- }
- }
+ },
+ },
+ copy_directories = {
+ "src/luacov/reporter/html",
+ },
}
diff --git a/src/luacov/reporter/html.lua b/src/luacov/reporter/html.lua
index e0fb080..c0c667b 100644
--- a/src/luacov/reporter/html.lua
+++ b/src/luacov/reporter/html.lua
@@ -14,7 +14,8 @@ end
----------------------------------------------------------------
--- parse template
do
- local dir = string.gsub(debug.getinfo(1).source, "^@(.+/)[^/]+$", "%1")
+ -- local dir = string.gsub(debug.getinfo(1).source, "^@(.+/)[^/]+$", "%1")
+ local dir = "/usr/lib/luarocks/rocks-5.4/luacov/scm-1/src/luacov/reporter/"
local dir_sep = package.config:sub(1, 1)
if not dir_sep:find("[/\\]") then
dir_sep = "/" |
The files and modules required by the html reporter are not installed.
The text was updated successfully, but these errors were encountered: