Module luacov.defaults

Default values for configuration options.

For project specific configuration create '.luacov' file in your project folder. It should be a Lua script setting various options as globals or returning table of options.

Tables

include Lua patterns for files to include when reporting.
exclude Lua patterns for files to exclude when reporting.
modules Table mapping names of modules to be included to their filenames.

Fields

statsfile Filename to store collected stats.
reportfile Filename to store report.
tick Enable saving coverage data after every savestepsize lines?
savestepsize Stats file updating frequency for luacov.tick.
runreport Run reporter on completion?
deletestats Delete stats file after reporting?
codefromstrings Process Lua code loaded from raw strings?
includeuntestedfiles Enable including untested files in report.


Tables

include
Lua patterns for files to include when reporting. All will be included if nothing is listed. Do not include the '.lua' extension. Path separator is always '/'. Overruled by exclude.

Usage:

    include = {
       "mymodule$",      -- the main module
       "mymodule%/.+$",  -- and everything namespaced underneath it
    }
exclude
Lua patterns for files to exclude when reporting. Nothing will be excluded if nothing is listed. Do not include the '.lua' extension. Path separator is always '/'. Overrules include.
modules
Table mapping names of modules to be included to their filenames. Has no effect if empty. Real filenames mentioned here will be used for reporting even if the modules have been installed elsewhere. Module name can contain '*' wildcard to match groups of modules, in this case corresponding path will be used as a prefix directory where modules from the group are located.

Usage:

    modules = {
       ["some_rock"] = "src/some_rock.lua",
       ["some_rock.*"] = "src"
    }

Fields

statsfile
Filename to store collected stats. Default: "luacov.stats.out".
reportfile
Filename to store report. Default: "luacov.report.out".
tick
Enable saving coverage data after every savestepsize lines? Setting this flag to true in config is equivalent to running LuaCov using luacov.tick module. Default: false.
savestepsize
Stats file updating frequency for luacov.tick. The lower this value - the more frequently results will be written out to the stats file. You may want to reduce this value (to, for example, 2) to avoid losing coverage data in case your program may terminate without triggering luacov exit hooks that are supposed to save the data. Default: 100.
runreport
Run reporter on completion? Default: false.
deletestats
Delete stats file after reporting? Default: false.
codefromstrings
Process Lua code loaded from raw strings? That is, when the 'source' field in the debug info does not start with '@'. Default: false.
includeuntestedfiles
Enable including untested files in report. If true, all untested files in "." will be included. If it is a table with directory and file paths, all untested files in these paths will be included. Note that you are not allowed to use patterns in these paths. Default: false.
generated by LDoc 1.5.0 Last updated 2024-12-04 15:36:32