lint: switch to linter blacklist
This commit is contained in:
@@ -1,24 +1,13 @@
|
|||||||
linters:
|
linters:
|
||||||
enable-all: false
|
enable-all: true
|
||||||
enable:
|
disable:
|
||||||
- golint
|
- maligned
|
||||||
- gosimple
|
- lll
|
||||||
- misspell
|
- gosec
|
||||||
- gocyclo
|
- prealloc
|
||||||
- gofmt
|
- unparam
|
||||||
- structcheck
|
- gochecknoglobals
|
||||||
- varcheck
|
- gochecknoinits
|
||||||
- ineffassign
|
|
||||||
- typecheck
|
|
||||||
- megacheck
|
|
||||||
- deadcode
|
|
||||||
- govet
|
|
||||||
- errcheck
|
|
||||||
- goimports
|
|
||||||
- depguard
|
|
||||||
- goconst
|
|
||||||
- unconvert
|
|
||||||
- gocritic
|
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
depguard:
|
depguard:
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ func Match(skip int, predicate func(runtime.Frame) bool) *runtime.Frame {
|
|||||||
i, n := skip+1, 16
|
i, n := skip+1, 16
|
||||||
for {
|
for {
|
||||||
fs := Frames(i, n)
|
fs := Frames(i, n)
|
||||||
for _, f := range fs {
|
for j, f := range fs {
|
||||||
if predicate(f) {
|
if predicate(f) {
|
||||||
return &f
|
return &fs[j]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(fs) < n {
|
if len(fs) < n {
|
||||||
|
|||||||
Reference in New Issue
Block a user