Skip to content
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

improper handling of relative paths #4

Open
josefschabasser opened this issue Apr 12, 2022 · 0 comments
Open

improper handling of relative paths #4

josefschabasser opened this issue Apr 12, 2022 · 0 comments

Comments

@josefschabasser
Copy link

josefschabasser commented Apr 12, 2022

cluacov is not aware that ./relative/path and relative/path are the same.

Used packages:

  • Lua 5.4
  • cluacov 0.1.2-1
  • luacov 0.15.0-1
  • luacov-multiple 0.5-1
  • luafilesystem 1.8.0-1
  • luaunit 3.4-1
  • lustache 1.3.1-0

luacov config:

return {
    -- standard luacov configuration keys and values here
    runreport = true,
    reportfile = 'luacov.report.out',

    -- add "^%.%/lua%/.+$" to add untested files when using cluacov - THIS WILL RESULT IN WRONG REPORTS!
    include = {"^lua%/.+$"},
    includeuntestedfiles = true,

    -- multiple settings
    reporter = "multiple",
    multiple = {
        reporters = {"default", "multiple.cobertura", "multiple.html"},
        cobertura = {reportfile = 'cobertura.xml'}
    }
}

HTML report without cluacov:
grafik

HTML report with cluacov:
grafik

HTML report with cluacov and the pattern mentioned above:
grafik

EDIT: I found this issue because I enabled includeuntestedfiles. Tested files are reported with a leading ./, untested files omit this string.

@josefschabasser josefschabasser changed the title improper handling of paths improper handling of relative paths Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant