Skip to content

Commit

Permalink
Fix existing linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kanata2 committed Nov 5, 2020
1 parent ad9fc2b commit b84423f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ linters:
- structcheck
- unconvert
issues:
# TODO(kanata2): fix existing issues
new: true
2 changes: 1 addition & 1 deletion block_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestNewHeaderBlock(t *testing.T) {

headerBlock := NewHeaderBlock(textInfo, HeaderBlockOptionBlockID("test_block"))
assert.Equal(t, string(headerBlock.Type), "header")
assert.Equal(t, string(headerBlock.BlockID), "test_block")
assert.Equal(t, headerBlock.BlockID, "test_block")
assert.Equal(t, headerBlock.Text.Type, "plain_text")
assert.Contains(t, headerBlock.Text.Text, "quite the header")
}
2 changes: 1 addition & 1 deletion block_section_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestNewSectionBlock(t *testing.T) {

sectionBlock := NewSectionBlock(textInfo, nil, nil, SectionBlockOptionBlockID("test_block"))
assert.Equal(t, string(sectionBlock.Type), "section")
assert.Equal(t, string(sectionBlock.BlockID), "test_block")
assert.Equal(t, sectionBlock.BlockID, "test_block")
assert.Equal(t, len(sectionBlock.Fields), 0)
assert.Nil(t, sectionBlock.Accessory)
assert.Equal(t, sectionBlock.Text.Type, "mrkdwn")
Expand Down
1 change: 0 additions & 1 deletion reminders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

type remindersHandler struct {
gotParams map[string]string
response string
}

func newRemindersHandler() *remindersHandler {
Expand Down
2 changes: 1 addition & 1 deletion slacktest/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (sts *Server) conversationsInfoHandler(w http.ResponseWriter, r *http.Reque
ch := values.Get("channel")

response := GroupConversationResponse{
Ok: true,
Ok: true,
Channel: slack.GroupConversation{
Conversation: slack.Conversation{
ID: ch,
Expand Down
4 changes: 2 additions & 2 deletions websocket_managed_conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func TestRTMGoodbye(t *testing.T) {

select {
case <-done:
// magic numbers from emperical testing.
// magic numbers from empirical testing.
assert.Equal(t, connected <= 7, true)
assert.Equal(t, disconnected <= 12, true)
case <-time.After(5 * time.Second):
Expand Down Expand Up @@ -158,7 +158,7 @@ func TestRTMDeadConnection(t *testing.T) {

select {
case <-done:
// magic numbers from emperical testing.
// magic numbers from empirical testing.
assert.Equal(t, connected <= 7, true)
assert.Equal(t, disconnected <= 7, true)
case <-time.After(5 * time.Second):
Expand Down

0 comments on commit b84423f

Please sign in to comment.