diff options
-rw-r--r-- | src/luacov/defaults.lua | 5 | ||||
-rw-r--r-- | src/luacov/runner.lua | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/luacov/defaults.lua b/src/luacov/defaults.lua index 50213b4..b93e5f2 100644 --- a/src/luacov/defaults.lua +++ b/src/luacov/defaults.lua @@ -12,6 +12,11 @@ return { --- Filename to store report. Default: "luacov.report.out". reportfile = "luacov.report.out", + --- Enable saving coverage data after every `savestepsize` lines? + -- Setting this flag to `true` in config is equivalent to running LuaCov + -- using `luacov.tick` module. + tick = false, + --- 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 diff --git a/src/luacov/runner.lua b/src/luacov/runner.lua index 7a74f70..d7f150b 100644 --- a/src/luacov/runner.lua +++ b/src/luacov/runner.lua @@ -311,6 +311,8 @@ local function set_config(configuration) for _, patt in ipairs(luacov_excludes) do table.insert(runner.configuration.exclude, patt) end + + runner.tick = runner.tick or runner.configuration.tick end local default_config_file = ".luacov" |