diff options
author | mpeterv <mpeterval@gmail.com> | 2016-04-17 18:24:46 +0300 |
---|---|---|
committer | mpeterv <mpeterval@gmail.com> | 2016-04-17 18:24:46 +0300 |
commit | e71360d949e72864fe36eb4ca4c1932025281c8b (patch) | |
tree | 04c0d5b682ab02b93dcc0ff1ebae9bc8d49faacb | |
parent | 7806e8bd91654b210ba7aa8f5125da3a3c5cab9a (diff) | |
download | luacov-e71360d949e72864fe36eb4ca4c1932025281c8b.tar.gz |
Don't increment tick counter for lines from ignored files
-rw-r--r-- | src/luacov/runner.lua | 22 |
1 files changed, 11 insertions, 11 deletions
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 ------------------------------------------------------ |