Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
InEdited committed Apr 8, 2019
1 parent e575246 commit 5818509
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/luacov/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ return {
-- using `luacov.tick` module. Default: false.
tick = false,

--- Include all files including untested ones in the report
--- Include all files including untested ones in the report
includeuntested = false,

--- Stats file updating frequency for `luacov.tick`.
Expand Down
17 changes: 6 additions & 11 deletions src/luacov/reporter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ function ReporterBase:new(conf)
local filtered_data = {}
local max_hits = 0


-- Several original paths can map to one real path,
-- their stats should be merged in this case.
for filename, file_stats in pairs(data) do
Expand All @@ -55,24 +54,20 @@ function ReporterBase:new(conf)
end
end


-- Add untested files to the files table
-- Add untested files to the files table
if conf.includeuntested then

for entry in lfs.dir(lfs.currentdir()) do

if string.find(entry,"%.lua$") then
if luacov.file_included(entry) then
realname = luacov.real_name(entry)

if luacov.file_included(entry) then
local realname = luacov.real_name(entry)

if not filtered_data[realname] then
if not filtered_data[realname] then
table.insert(files,realname)
filtered_data[realname] = {0}
end
end
end
end
end
end
end

table.sort(files)
Expand Down

0 comments on commit 5818509

Please sign in to comment.