Skip to content

Commit

Permalink
Merge pull request #30 from owenrumney/handle-missing-filenames
Browse files Browse the repository at this point in the history
Handle missing filenames
  • Loading branch information
owenrumney authored Mar 3, 2021
2 parents c46fe90 + 1e7a2af commit 1aa2120
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/app/squealer/scan/git_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ func (s *gitScanner) processFile(cf CommitFile) error {
return err
}

err = s.mc.Evaluate(cf.changePath, content, cf.commit)
filepath := cf.changePath
if filepath == "" {
filepath = cf.file.Name
}

err = s.mc.Evaluate(filepath, content, cf.commit)
s.metrics.IncrementFilesProcessed()
return err
}
Expand Down

0 comments on commit 1aa2120

Please sign in to comment.