Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi Fuhrimann committed Jun 1, 2018
1 parent 3c4d62a commit 9afb5cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
11 changes: 4 additions & 7 deletions is.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,7 @@ func areEqual(a, b interface{}) bool {
}
aValue := reflect.ValueOf(a)
bValue := reflect.ValueOf(b)
if aValue == bValue {
return true
}
return false
return aValue == bValue
}

func callerinfo() (path string, line int, ok bool) {
Expand Down Expand Up @@ -318,7 +315,7 @@ func loadArguments(path string, line int) (string, bool) {
text = text[braceI+1:]
cs := bufio.NewScanner(strings.NewReader(text))
cs.Split(bufio.ScanBytes)
i := 0
j := 0
c := 1
for cs.Scan() {
switch cs.Text() {
Expand All @@ -330,9 +327,9 @@ func loadArguments(path string, line int) (string, bool) {
if c == 0 {
break
}
i++
j++
}
text = text[:i]
text = text[:j]
return text, true
}
i++
Expand Down
3 changes: 1 addition & 2 deletions is_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ func TestLoadArguments(t *testing.T) {
// TestSubtests ensures subtests work as expected.
// https://github.com/matryer/is/issues/1
func TestSubtests(t *testing.T) {
is := New(t)
t.Run("sub1", func(t *testing.T) {
is := is.New(t)
is := New(t)
is.Equal(1+1, 2)
})
}

0 comments on commit 9afb5cf

Please sign in to comment.