From 734f50d8fcb4df4cf611e774123b835f9fc5666b Mon Sep 17 00:00:00 2001 From: Joseph Richey Date: Sun, 11 Feb 2018 20:39:12 -0800 Subject: golint: Use fork that respects vendor directory Ideally, we would just use "golint ./..." to check all our our source files for lint error. However, this does not work because it will include all packages in the vendor directory. The pull request at: https://github.com/golang/lint/pull/325 fixes this issue, so we will use it until the PR has been merged. --- vendor/github.com/golang/lint/golint/golint.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/golang/lint/golint') diff --git a/vendor/github.com/golang/lint/golint/golint.go b/vendor/github.com/golang/lint/golint/golint.go index d8360ad..0088274 100644 --- a/vendor/github.com/golang/lint/golint/golint.go +++ b/vendor/github.com/golang/lint/golint/golint.go @@ -48,9 +48,12 @@ func main() { var dirsRun, filesRun, pkgsRun int var args []string for _, arg := range flag.Args() { - if strings.HasSuffix(arg, "/...") && isDir(arg[:len(arg)-len("/...")]) { + if trimmedArg := strings.TrimSuffix(arg, "/..."); trimmedArg != arg && isDir(trimmedArg) { dirsRun = 1 for _, dirname := range allPackagesInFS(arg) { + if strings.Contains(dirname[len(trimmedArg):], "/vendor/") { + continue + } args = append(args, dirname) } } else if isDir(arg) { -- cgit v1.3