Skip to content

improper handling of relative paths #4

@josefschabasser

Description

@josefschabasser

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions