Permalink
Browse files

reviewdog: return BulkCommentService.Flash() error

  • Loading branch information...
1 parent c1092ea commit 5256edd27a264e2353e104d1cd871e8720757b9a @haya14busa committed Dec 16, 2016
Showing with 4 additions and 3 deletions.
  1. +4 −3 reviewdog.go
View
@@ -91,9 +91,6 @@ func (w *Reviewdog) Run(r io.Reader) error {
return err
}
- if bulk, ok := w.c.(BulkCommentService); ok {
- defer bulk.Flash()
- }
for _, result := range results {
addedline := addedlines.Get(result.Path, result.Lnum)
if filepath.IsAbs(result.Path) {
@@ -117,6 +114,10 @@ func (w *Reviewdog) Run(r io.Reader) error {
}
}
+ if bulk, ok := w.c.(BulkCommentService); ok {
+ return bulk.Flash()
+ }
+
return nil
}

0 comments on commit 5256edd

Please sign in to comment.