-
-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor comment writer #51
Conversation
w io.Writer | ||
} | ||
|
||
func NewUnifiedCommentWriter(w io.Writer) *UnifiedCommentWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewUnifiedCommentWriter should have comment or be unexported
w io.Writer | ||
} | ||
|
||
func NewCommentWriter(w io.Writer) *CommentWriter { | ||
return &CommentWriter{w: w} | ||
func NewRawCommentWriter(w io.Writer) *RawCommentWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported function NewRawCommentWriter should have comment or be unexported
} | ||
|
||
func (s *CommentWriter) Post(c *Comment) error { | ||
func (s *RawCommentWriter) Post(c *Comment) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported method RawCommentWriter.Post should have comment or be unexported
return &UnifiedCommentWriter{w: w} | ||
} | ||
|
||
func (mc *UnifiedCommentWriter) Post(c *Comment) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[golint] reported by reviewdog 🐶
exported method UnifiedCommentWriter.Post should have comment or be unexported
@@ -84,6 +91,9 @@ func (w *Reviewdog) Run(r io.Reader) error { | |||
return err | |||
} | |||
|
|||
if bulk, ok := w.c.(BulkCommentService); ok { | |||
defer bulk.Flash() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[errcheck] reported by reviewdog 🐶
defer bulk.Flash()
Current coverage is 77.47% (diff: 81.81%)@@ master #51 diff @@
==========================================
Files 8 9 +1
Lines 641 666 +25
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 445 516 +71
+ Misses 164 106 -58
- Partials 32 44 +12
|
want := `<sub>reported by [reviewdog](https://github.com/haya14busa/reviewdog) :dog:</sub> | ||
[reviewdog] test` | ||
if body != want { | ||
t.Error("body: got %v, want %v", body, want) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[govet] reported by reviewdog 🐶
possible formatting directive in Error call
ref: #47