From e71360d949e72864fe36eb4ca4c1932025281c8b Mon Sep 17 00:00:00 2001 From: mpeterv Date: Sun, 17 Apr 2016 18:24:46 +0300 Subject: Don't increment tick counter for lines from ignored files --- src/luacov/runner.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/luacov/runner.lua b/src/luacov/runner.lua index 6bf8c89..e9b87b7 100644 --- a/src/luacov/runner.lua +++ b/src/luacov/runner.lua @@ -103,17 +103,6 @@ function runner.debug_hook(_, line_nr, level) return end - if tick then - ctr = ctr + 1 - if ctr == runner.configuration.savestepsize then - ctr = 0 - - if not paused then - stats.save(runner.configuration.statsfile, data) - end - end - end - -- get name of processed file; ignore Lua code loaded from raw strings local name = debug.getinfo(level, "S").source local prefixed_name = string.match(name, "^@(.*)") @@ -148,6 +137,17 @@ function runner.debug_hook(_, line_nr, level) if hits > file.max_hits then file.max_hits = hits end + + if tick then + ctr = ctr + 1 + if ctr == runner.configuration.savestepsize then + ctr = 0 + + if not paused then + stats.save(runner.configuration.statsfile, data) + end + end + end end ------------------------------------------------------ -- cgit v1.2.1