Skip to content

Commit

Permalink
lint: switch to linter blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcloughlin committed Jan 10, 2019
1 parent 2caf9a2 commit 56c962b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
29 changes: 9 additions & 20 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
linters:
enable-all: false
enable:
- golint
- gosimple
- misspell
- gocyclo
- gofmt
- structcheck
- varcheck
- ineffassign
- typecheck
- megacheck
- deadcode
- govet
- errcheck
- goimports
- depguard
- goconst
- unconvert
- gocritic
enable-all: true
disable:
- maligned
- lll
- gosec
- prealloc
- unparam
- gochecknoglobals
- gochecknoinits

linters-settings:
depguard:
Expand Down
4 changes: 2 additions & 2 deletions internal/stack/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame {
i, n := skip+1, 16
for {
fs := Frames(i, n)
for _, f := range fs {
for j, f := range fs {
if predicate(f) {
return &f
return &fs[j]
}
}
if len(fs) < n {
Expand Down

0 comments on commit 56c962b

Please sign in to comment.