Skip to content

Commit

Permalink
fixed issues introduced in 4ef15e2
Browse files Browse the repository at this point in the history
`aggregateLanguageSummary` returned `nil` instead of an empty slice in case of an empty input.
  • Loading branch information
jan-guenter committed Dec 13, 2021
1 parent 4ef15e2 commit 2413a2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/formatters.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ func aggregateLanguageSummary(input chan *FileJob) []LanguageSummary {
_, ok := languages[res.Language]

if !ok {
var files []*FileJob
files := []*FileJob{}
if Files {
files = append(files, res)
}
Expand Down Expand Up @@ -1112,7 +1112,7 @@ func aggregateLanguageSummary(input chan *FileJob) []LanguageSummary {
}
}

var language []LanguageSummary
language := []LanguageSummary{}
for _, summary := range languages {
language = append(language, summary)
}
Expand Down

0 comments on commit 2413a2e

Please sign in to comment.