File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ return {
17
17
-- using `luacov.tick` module. Default: false.
18
18
tick = false ,
19
19
20
- --- Include all files including untested ones in the report
20
+ --- Include all files including untested ones in the report
21
21
includeuntested = false ,
22
22
23
23
--- Stats file updating frequency for `luacov.tick`.
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ function ReporterBase:new(conf)
35
35
local filtered_data = {}
36
36
local max_hits = 0
37
37
38
-
39
38
-- Several original paths can map to one real path,
40
39
-- their stats should be merged in this case.
41
40
for filename , file_stats in pairs (data ) do
@@ -55,24 +54,20 @@ function ReporterBase:new(conf)
55
54
end
56
55
end
57
56
58
-
59
- -- Add untested files to the files table
57
+ -- Add untested files to the files table
60
58
if conf .includeuntested then
61
-
62
59
for entry in lfs .dir (lfs .currentdir ()) do
63
-
64
60
if string.find (entry ," %.lua$" ) then
65
- if luacov .file_included (entry ) then
66
- realname = luacov .real_name (entry )
67
-
61
+ if luacov .file_included (entry ) then
62
+ local realname = luacov .real_name (entry )
68
63
69
- if not filtered_data [realname ] then
64
+ if not filtered_data [realname ] then
70
65
table.insert (files ,realname )
71
66
filtered_data [realname ] = {0 }
72
- end
67
+ end
73
68
end
74
69
end
75
- end
70
+ end
76
71
end
77
72
78
73
table.sort (files )
You can’t perform that action at this time.
0 commit comments