1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Update gitea-vet to v0.2.1 (#12282)

* change to new code location

* vendor

* tagged version v0.2.0

* gitea-vet v0.2.1

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543
2020-08-15 19:13:07 +02:00
committed by GitHub
parent eb60a5d054
commit ee97e6a66a
52 changed files with 3421 additions and 403 deletions

View File

@@ -10,7 +10,6 @@ import (
"bufio"
"bytes"
"fmt"
"go/build"
"io/ioutil"
"log"
"os"
@@ -47,16 +46,6 @@ type Root struct {
Type RootType
}
// SrcDirsRoots returns the roots from build.Default.SrcDirs(). Not modules-compatible.
func SrcDirsRoots(ctx *build.Context) []Root {
var roots []Root
roots = append(roots, Root{filepath.Join(ctx.GOROOT, "src"), RootGOROOT})
for _, p := range filepath.SplitList(ctx.GOPATH) {
roots = append(roots, Root{filepath.Join(p, "src"), RootGOPATH})
}
return roots
}
// Walk walks Go source directories ($GOROOT, $GOPATH, etc) to find packages.
// For each package found, add will be called (concurrently) with the absolute
// paths of the containing source directory and the package directory.