fix govet: don't recurse into dirs

This commit is contained in:
golangci 2018-05-06 09:52:42 +03:00
parent ffd2723a3d
commit 16a24dc92b
34 changed files with 16 additions and 18 deletions

23
Gopkg.lock generated
View File

@ -46,17 +46,6 @@
revision = "1adfc126b41513cc696b209667c8656ea7aac67c" revision = "1adfc126b41513cc696b209667c8656ea7aac67c"
version = "v1.0.0" version = "v1.0.0"
[[projects]]
branch = "master"
name = "github.com/golang/go"
packages = [
".",
"lib/cfg",
"lib/whitelist"
]
revision = "c5b798e3c473354ef919e8fe4e0a11b4a9e36d18"
source = "github.com/golangci/govet"
[[projects]] [[projects]]
branch = "master" branch = "master"
name = "github.com/golang/lint" name = "github.com/golang/lint"
@ -89,6 +78,16 @@
] ]
revision = "841f39765a89eddef59ce611612775291b83594b" revision = "841f39765a89eddef59ce611612775291b83594b"
[[projects]]
branch = "master"
name = "github.com/golangci/govet"
packages = [
".",
"lib/cfg",
"lib/whitelist"
]
revision = "31bebf17d90d40b728c41fecdd5acf5fb8654fc7"
[[projects]] [[projects]]
name = "github.com/inconshreveable/mousetrap" name = "github.com/inconshreveable/mousetrap"
packages = ["."] packages = ["."]
@ -232,6 +231,6 @@
[solve-meta] [solve-meta]
analyzer-name = "dep" analyzer-name = "dep"
analyzer-version = 1 analyzer-version = 1
inputs-digest = "98e0ff9e850bf286e0e15b788f303a6baffcccb7c4d9a55155f28eee386cb43b" inputs-digest = "c4187e819ccca1b06537adb888a052a895c6236f90accd827314c12b2fd1ce3e"
solver-name = "gps-cdcl" solver-name = "gps-cdcl"
solver-version = 1 solver-version = 1

View File

@ -51,9 +51,8 @@
source = "github.com/golangci/errcheck" source = "github.com/golangci/errcheck"
[[constraint]] [[constraint]]
name = "github.com/golang/go" name = "github.com/golangci/govet"
branch = "master" branch = "master"
source = "github.com/golangci/govet"
[prune] [prune]
go-tests = true go-tests = true

View File

@ -3,10 +3,10 @@ package golinters
import ( import (
"context" "context"
govetAPI "github.com/golang/go"
"github.com/golangci/golangci-lint/pkg/config" "github.com/golangci/golangci-lint/pkg/config"
"github.com/golangci/golangci-lint/pkg/result" "github.com/golangci/golangci-lint/pkg/result"
"github.com/golangci/golangci-shared/pkg/executors" "github.com/golangci/golangci-shared/pkg/executors"
govetAPI "github.com/golangci/govet"
) )
type govet struct{} type govet struct{}

View File

@ -12,7 +12,7 @@ import (
"go/types" "go/types"
"strings" "strings"
"github.com/golang/go/lib/whitelist" "github.com/golangci/govet/lib/whitelist"
) )
var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite white list; for testing only") var compositeWhiteList = flag.Bool("compositewhitelist", true, "use composite white list; for testing only")

View File

@ -52,7 +52,7 @@ func Run(paths, buildTags []string, checkShadowing bool) ([]Issue, error) {
} }
if dirsRun { if dirsRun {
for _, name := range paths { for _, name := range paths {
walkDir(name) doPackageDir(name)
} }
return foundIssues, nil return foundIssues, nil
} }

View File

@ -10,7 +10,7 @@ import (
"go/types" "go/types"
"strconv" "strconv"
"github.com/golang/go/lib/cfg" "github.com/golangci/govet/lib/cfg"
) )
func init() { func init() {