From eb37f14923485a04f31099caf6df81fafdb6ff45 Mon Sep 17 00:00:00 2001 From: 6543 <6543@noreply.gitea.io> Date: Tue, 21 Jul 2020 16:17:52 +0000 Subject: [PATCH] Update gitea-vet v0.2.0 (#164) tagged version v0.2.0 make vendor Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/164 Reviewed-by: Lunny Xiao Reviewed-by: techknowlogick --- Makefile | 2 +- build.go | 2 +- go.mod | 4 +- go.sum | 8 +- vendor/code.gitea.io/gitea-vet/.changelog.yml | 30 ++++++ vendor/code.gitea.io/gitea-vet/.drone.yml | 45 ++++++++ .../gitea-vet/.gitignore | 0 vendor/code.gitea.io/gitea-vet/.golangci.yml | 23 ++++ vendor/code.gitea.io/gitea-vet/CHANGELOG.md | 6 ++ .../gitea-vet/LICENSE | 0 vendor/code.gitea.io/gitea-vet/Makefile | 22 ++++ vendor/code.gitea.io/gitea-vet/README.md | 11 ++ .../gitea-vet/checks/imports.go | 18 +--- .../gitea-vet/checks/license.go | 2 +- .../gitea-vet/checks/migrations.go | 59 ++++++++++ .../gitea-vet/go.mod | 2 +- .../gitea-vet/go.sum | 0 .../gitea-vet/main.go | 4 +- vendor/gitea.com/jolheiser/gitea-vet/Makefile | 7 -- .../gitea.com/jolheiser/gitea-vet/README.md | 7 -- .../internal/analysisinternal/analysis.go | 101 ++++++++++++++++-- vendor/modules.txt | 8 +- 22 files changed, 310 insertions(+), 51 deletions(-) create mode 100644 vendor/code.gitea.io/gitea-vet/.changelog.yml create mode 100644 vendor/code.gitea.io/gitea-vet/.drone.yml rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/.gitignore (100%) create mode 100644 vendor/code.gitea.io/gitea-vet/.golangci.yml create mode 100644 vendor/code.gitea.io/gitea-vet/CHANGELOG.md rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/LICENSE (100%) create mode 100644 vendor/code.gitea.io/gitea-vet/Makefile create mode 100644 vendor/code.gitea.io/gitea-vet/README.md rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/checks/imports.go (72%) rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/checks/license.go (97%) create mode 100644 vendor/code.gitea.io/gitea-vet/checks/migrations.go rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/go.mod (66%) rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/go.sum (100%) rename vendor/{gitea.com/jolheiser => code.gitea.io}/gitea-vet/main.go (84%) delete mode 100644 vendor/gitea.com/jolheiser/gitea-vet/Makefile delete mode 100644 vendor/gitea.com/jolheiser/gitea-vet/README.md diff --git a/Makefile b/Makefile index 4edb27c..88743fe 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ vet: # Default vet $(GO) vet -mod=vendor $(PACKAGES) # Custom vet - $(GO) build -mod=vendor gitea.com/jolheiser/gitea-vet + $(GO) build -mod=vendor code.gitea.io/gitea-vet $(GO) vet -vettool=gitea-vet $(PACKAGES) .PHONY: lint diff --git a/build.go b/build.go index ae80107..4a0d72c 100644 --- a/build.go +++ b/build.go @@ -10,5 +10,5 @@ package main import ( // for vet - _ "gitea.com/jolheiser/gitea-vet" + _ "code.gitea.io/gitea-vet" ) diff --git a/go.mod b/go.mod index cda18d3..8694018 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module code.gitea.io/tea go 1.12 require ( + code.gitea.io/gitea-vet v0.2.0 code.gitea.io/sdk/gitea v0.12.1 - gitea.com/jolheiser/gitea-vet v0.1.0 github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect github.com/go-git/go-git/v5 v5.1.0 @@ -17,6 +17,6 @@ require ( golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 golang.org/x/net v0.0.0-20200707034311-ab3426394381 // indirect golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect - golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed // indirect + golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a // indirect gopkg.in/yaml.v2 v2.3.0 ) diff --git a/go.sum b/go.sum index 030c9a2..88cc401 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ +code.gitea.io/gitea-vet v0.2.0 h1:xkUePzbHI8e0qp4Aly4GBSd0+6cqEMVTrdZq57fPozo= +code.gitea.io/gitea-vet v0.2.0/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= code.gitea.io/sdk/gitea v0.12.1 h1:bMgjEqPnNX/i6TpVwXwpjJtFOnUSuC9P6yy/jjy8sjY= code.gitea.io/sdk/gitea v0.12.1/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= -gitea.com/jolheiser/gitea-vet v0.1.0 h1:gJEms9YWbIcrPOEmDOJ+5JZXCYFxNpwxlI73uRulAi4= -gitea.com/jolheiser/gitea-vet v0.1.0/go.mod h1:2Oa6TAdEp1N/38oBNh3ZeiSEER60D/CeDaBFv2sdH58= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= @@ -125,8 +125,8 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224 h1:azwY/v0y0K4mFHVsg5+UrTgchqALYWpqVo6vL5OmkmI= golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed h1:+qzWo37K31KxduIYaBeMqJ8MUOyTayOQKpH9aDPLMSY= -golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a h1:kVMPw4f6EVqYdfGQTedjrpw1dbE2PEMfw4jwXsNdn9s= +golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= diff --git a/vendor/code.gitea.io/gitea-vet/.changelog.yml b/vendor/code.gitea.io/gitea-vet/.changelog.yml new file mode 100644 index 0000000..b3e6446 --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/.changelog.yml @@ -0,0 +1,30 @@ +# The full repository name +repo: gitea/gitea-vet + +# Service type (gitea or github) +service: gitea + +# Base URL for Gitea instance if using gitea service type (optional) +base-url: https://gitea.com + +# Changelog groups and which labeled PRs to add to each group +groups: + - + name: BREAKING + labels: + - breaking + - + name: FEATURES + labels: + - feature + - + name: BUGFIXES + labels: + - bug + - + name: ENHANCEMENTS + labels: + - enhancement + +# regex indicating which labels to skip for the changelog +skip-labels: skip-changelog|backport\/.+ diff --git a/vendor/code.gitea.io/gitea-vet/.drone.yml b/vendor/code.gitea.io/gitea-vet/.drone.yml new file mode 100644 index 0000000..dd0fc13 --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/.drone.yml @@ -0,0 +1,45 @@ +--- +kind: pipeline +name: compliance + +platform: + os: linux + arch: arm64 + +trigger: + event: + - pull_request + +steps: + - name: check + pull: always + image: golang:1.14 + environment: + GOPROXY: https://goproxy.cn + commands: + - make build + - make lint + - make vet + +--- +kind: pipeline +name: build-master + +platform: + os: linux + arch: amd64 + +trigger: + branch: + - master + event: + - push + +steps: + - name: build + pull: always + image: techknowlogick/xgo:latest + environment: + GOPROXY: https://goproxy.cn + commands: + - make build \ No newline at end of file diff --git a/vendor/gitea.com/jolheiser/gitea-vet/.gitignore b/vendor/code.gitea.io/gitea-vet/.gitignore similarity index 100% rename from vendor/gitea.com/jolheiser/gitea-vet/.gitignore rename to vendor/code.gitea.io/gitea-vet/.gitignore diff --git a/vendor/code.gitea.io/gitea-vet/.golangci.yml b/vendor/code.gitea.io/gitea-vet/.golangci.yml new file mode 100644 index 0000000..704d99a --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/.golangci.yml @@ -0,0 +1,23 @@ +linters: + enable: + - deadcode + - dogsled + - dupl + - errcheck + - gocognit + - goconst + - gocritic + - gocyclo + - gofmt + - golint + - gosimple + - govet + - maligned + - misspell + - prealloc + - staticcheck + - structcheck + - typecheck + - unparam + - unused + - varcheck \ No newline at end of file diff --git a/vendor/code.gitea.io/gitea-vet/CHANGELOG.md b/vendor/code.gitea.io/gitea-vet/CHANGELOG.md new file mode 100644 index 0000000..e4ddfd6 --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/CHANGELOG.md @@ -0,0 +1,6 @@ +## [0.2.0](https://gitea.com/gitea/gitea-vet/pulls?q=&type=all&state=closed&milestone=1272) - 2020-07-20 + +* FEATURES + * Add migrations check (#5) +* BUGFIXES + * Correct Import Paths (#6) diff --git a/vendor/gitea.com/jolheiser/gitea-vet/LICENSE b/vendor/code.gitea.io/gitea-vet/LICENSE similarity index 100% rename from vendor/gitea.com/jolheiser/gitea-vet/LICENSE rename to vendor/code.gitea.io/gitea-vet/LICENSE diff --git a/vendor/code.gitea.io/gitea-vet/Makefile b/vendor/code.gitea.io/gitea-vet/Makefile new file mode 100644 index 0000000..e9c9f4f --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/Makefile @@ -0,0 +1,22 @@ +GO ?= go + +.PHONY: build +build: + $(GO) build + +.PHONY: fmt +fmt: + $(GO) fmt ./... + +.PHONY: vet +vet: build + $(GO) vet ./... + $(GO) vet -vettool=gitea-vet ./... + +.PHONY: lint +lint: + @hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + export BINARY="golangci-lint"; \ + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(shell $(GO) env GOPATH)/bin v1.24.0; \ + fi + golangci-lint run --timeout 5m \ No newline at end of file diff --git a/vendor/code.gitea.io/gitea-vet/README.md b/vendor/code.gitea.io/gitea-vet/README.md new file mode 100644 index 0000000..5d3d097 --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/README.md @@ -0,0 +1,11 @@ +# gitea-vet + +[![Build Status](https://drone.gitea.com/api/badges/gitea/gitea-vet/status.svg)](https://drone.gitea.com/gitea/gitea-vet) + +`go vet` tool for Gitea + +| Analyzer | Description | +|------------|-----------------------------------------------------------------------------| +| Imports | Checks for import sorting. stdlib->code.gitea.io->other | +| License | Checks file headers for some form of `Copyright...YYYY...Gitea/Gogs` | +| Migrations | Checks for black-listed packages in `code.gitea.io/gitea/models/migrations` | diff --git a/vendor/gitea.com/jolheiser/gitea-vet/checks/imports.go b/vendor/code.gitea.io/gitea-vet/checks/imports.go similarity index 72% rename from vendor/gitea.com/jolheiser/gitea-vet/checks/imports.go rename to vendor/code.gitea.io/gitea-vet/checks/imports.go index 6ef5975..15563c8 100644 --- a/vendor/gitea.com/jolheiser/gitea-vet/checks/imports.go +++ b/vendor/code.gitea.io/gitea-vet/checks/imports.go @@ -12,7 +12,7 @@ import ( var Imports = &analysis.Analyzer{ Name: "imports", - Doc: "check for import order.", + Doc: "check for import order", Run: runImports, } @@ -22,11 +22,12 @@ func runImports(pass *analysis.Pass) (interface{}, error) { for _, im := range file.Imports { var lvl int val := im.Path.Value - if importHasPrefix(val, "code.gitea.io") { + switch { + case importHasPrefix(val, "code.gitea.io"): lvl = 2 - } else if strings.Contains(val, ".") { + case strings.Contains(val, "."): lvl = 3 - } else { + default: lvl = 1 } @@ -43,12 +44,3 @@ func runImports(pass *analysis.Pass) (interface{}, error) { func importHasPrefix(s, p string) bool { return strings.HasPrefix(s, "\""+p) } - -func sliceHasPrefix(s string, prefixes ...string) bool { - for _, p := range prefixes { - if importHasPrefix(s, p) { - return true - } - } - return false -} diff --git a/vendor/gitea.com/jolheiser/gitea-vet/checks/license.go b/vendor/code.gitea.io/gitea-vet/checks/license.go similarity index 97% rename from vendor/gitea.com/jolheiser/gitea-vet/checks/license.go rename to vendor/code.gitea.io/gitea-vet/checks/license.go index 83f9e3c..a3ae047 100644 --- a/vendor/gitea.com/jolheiser/gitea-vet/checks/license.go +++ b/vendor/code.gitea.io/gitea-vet/checks/license.go @@ -19,7 +19,7 @@ var ( var License = &analysis.Analyzer{ Name: "license", - Doc: "check for a copyright header.", + Doc: "check for a copyright header", Run: runLicense, } diff --git a/vendor/code.gitea.io/gitea-vet/checks/migrations.go b/vendor/code.gitea.io/gitea-vet/checks/migrations.go new file mode 100644 index 0000000..fae3fa6 --- /dev/null +++ b/vendor/code.gitea.io/gitea-vet/checks/migrations.go @@ -0,0 +1,59 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package checks + +import ( + "errors" + "os/exec" + "strings" + + "golang.org/x/tools/go/analysis" +) + +var Migrations = &analysis.Analyzer{ + Name: "migrations", + Doc: "check migrations for black-listed packages.", + Run: checkMigrations, +} + +var migrationBlacklist = []string{ + "code.gitea.io/gitea/models", + "code.gitea.io/gitea/modules/structs", +} + +func checkMigrations(pass *analysis.Pass) (interface{}, error) { + if !strings.EqualFold(pass.Pkg.Path(), "code.gitea.io/gitea/models/migrations") { + return nil, nil + } + + if _, err := exec.LookPath("go"); err != nil { + return nil, errors.New("go was not found in the PATH") + } + + depsCmd := exec.Command("go", "list", "-f", `{{join .Deps "\n"}}`, "code.gitea.io/gitea/models/migrations") + depsOut, err := depsCmd.Output() + if err != nil { + return nil, err + } + + deps := strings.Split(string(depsOut), "\n") + for _, dep := range deps { + if stringInSlice(dep, migrationBlacklist) { + pass.Reportf(0, "code.gitea.io/gitea/models/migrations cannot depend on the following packages: %s", migrationBlacklist) + return nil, nil + } + } + + return nil, nil +} + +func stringInSlice(needle string, haystack []string) bool { + for _, h := range haystack { + if strings.EqualFold(needle, h) { + return true + } + } + return false +} diff --git a/vendor/gitea.com/jolheiser/gitea-vet/go.mod b/vendor/code.gitea.io/gitea-vet/go.mod similarity index 66% rename from vendor/gitea.com/jolheiser/gitea-vet/go.mod rename to vendor/code.gitea.io/gitea-vet/go.mod index 241ed5c..ed0987c 100644 --- a/vendor/gitea.com/jolheiser/gitea-vet/go.mod +++ b/vendor/code.gitea.io/gitea-vet/go.mod @@ -1,4 +1,4 @@ -module gitea.com/jolheiser/gitea-vet +module code.gitea.io/gitea-vet go 1.14 diff --git a/vendor/gitea.com/jolheiser/gitea-vet/go.sum b/vendor/code.gitea.io/gitea-vet/go.sum similarity index 100% rename from vendor/gitea.com/jolheiser/gitea-vet/go.sum rename to vendor/code.gitea.io/gitea-vet/go.sum diff --git a/vendor/gitea.com/jolheiser/gitea-vet/main.go b/vendor/code.gitea.io/gitea-vet/main.go similarity index 84% rename from vendor/gitea.com/jolheiser/gitea-vet/main.go rename to vendor/code.gitea.io/gitea-vet/main.go index 9b8b000..4894055 100644 --- a/vendor/gitea.com/jolheiser/gitea-vet/main.go +++ b/vendor/code.gitea.io/gitea-vet/main.go @@ -5,7 +5,8 @@ package main import ( - "gitea.com/jolheiser/gitea-vet/checks" + "code.gitea.io/gitea-vet/checks" + "golang.org/x/tools/go/analysis/unitchecker" ) @@ -13,5 +14,6 @@ func main() { unitchecker.Main( checks.Imports, checks.License, + checks.Migrations, ) } diff --git a/vendor/gitea.com/jolheiser/gitea-vet/Makefile b/vendor/gitea.com/jolheiser/gitea-vet/Makefile deleted file mode 100644 index 5305662..0000000 --- a/vendor/gitea.com/jolheiser/gitea-vet/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY: build -build: - go build - -.PHONY: fmt -fmt: - go fmt ./... \ No newline at end of file diff --git a/vendor/gitea.com/jolheiser/gitea-vet/README.md b/vendor/gitea.com/jolheiser/gitea-vet/README.md deleted file mode 100644 index 5fc03e0..0000000 --- a/vendor/gitea.com/jolheiser/gitea-vet/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# gitea-vet -`go vet` tool for Gitea - -| Analyzer | Description | -|----------|---------------------------------------------------------------------| -| Imports | Checks for import sorting. stdlib->code.gitea.io->other | -| License | Checks file headers for some form of `Copyright...YYYY...Gitea/Gogs`| diff --git a/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go index 311fbfd..a194f53 100644 --- a/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go +++ b/vendor/golang.org/x/tools/internal/analysisinternal/analysis.go @@ -16,6 +16,11 @@ import ( "golang.org/x/tools/go/ast/astutil" ) +var ( + GetTypeErrors func(p interface{}) []types.Error + SetTypeErrors func(p interface{}, errors []types.Error) +) + func TypeErrorEndPos(fset *token.FileSet, src []byte, start token.Pos) token.Pos { // Get the end position for the type error. offset, end := fset.PositionFor(start, false).Offset, start @@ -79,9 +84,95 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty default: return ast.NewIdent(t.Name()) } + case *types.Pointer: + x := TypeExpr(fset, f, pkg, t.Elem()) + if x == nil { + return nil + } + return &ast.UnaryExpr{ + Op: token.MUL, + X: x, + } + case *types.Array: + elt := TypeExpr(fset, f, pkg, t.Elem()) + if elt == nil { + return nil + } + return &ast.ArrayType{ + Len: &ast.BasicLit{ + Kind: token.INT, + Value: fmt.Sprintf("%d", t.Len()), + }, + Elt: elt, + } + case *types.Slice: + elt := TypeExpr(fset, f, pkg, t.Elem()) + if elt == nil { + return nil + } + return &ast.ArrayType{ + Elt: elt, + } + case *types.Map: + key := TypeExpr(fset, f, pkg, t.Key()) + value := TypeExpr(fset, f, pkg, t.Elem()) + if key == nil || value == nil { + return nil + } + return &ast.MapType{ + Key: key, + Value: value, + } + case *types.Chan: + dir := ast.ChanDir(t.Dir()) + if t.Dir() == types.SendRecv { + dir = ast.SEND | ast.RECV + } + value := TypeExpr(fset, f, pkg, t.Elem()) + if value == nil { + return nil + } + return &ast.ChanType{ + Dir: dir, + Value: value, + } + case *types.Signature: + var params []*ast.Field + for i := 0; i < t.Params().Len(); i++ { + p := TypeExpr(fset, f, pkg, t.Params().At(i).Type()) + if p == nil { + return nil + } + params = append(params, &ast.Field{ + Type: p, + Names: []*ast.Ident{ + { + Name: t.Params().At(i).Name(), + }, + }, + }) + } + var returns []*ast.Field + for i := 0; i < t.Results().Len(); i++ { + r := TypeExpr(fset, f, pkg, t.Results().At(i).Type()) + if r == nil { + return nil + } + returns = append(returns, &ast.Field{ + Type: r, + }) + } + return &ast.FuncType{ + Params: &ast.FieldList{ + List: params, + }, + Results: &ast.FieldList{ + List: returns, + }, + } case *types.Named: if t.Obj().Pkg() == nil { - return nil + return ast.NewIdent(t.Obj().Name()) } if t.Obj().Pkg() == pkg { return ast.NewIdent(t.Obj().Name()) @@ -104,19 +195,11 @@ func TypeExpr(fset *token.FileSet, f *ast.File, pkg *types.Package, typ types.Ty X: ast.NewIdent(pkgName), Sel: ast.NewIdent(t.Obj().Name()), } - case *types.Pointer: - return &ast.UnaryExpr{ - Op: token.MUL, - X: TypeExpr(fset, f, pkg, t.Elem()), - } default: return nil // TODO: anonymous structs, but who does that } } -var GetTypeErrors = func(p interface{}) []types.Error { return nil } -var SetTypeErrors = func(p interface{}, errors []types.Error) {} - type TypeErrorPass string const ( diff --git a/vendor/modules.txt b/vendor/modules.txt index a671616..4c28853 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,8 +1,8 @@ +# code.gitea.io/gitea-vet v0.2.0 +code.gitea.io/gitea-vet +code.gitea.io/gitea-vet/checks # code.gitea.io/sdk/gitea v0.12.1 code.gitea.io/sdk/gitea -# gitea.com/jolheiser/gitea-vet v0.1.0 -gitea.com/jolheiser/gitea-vet -gitea.com/jolheiser/gitea-vet/checks # github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 github.com/araddon/dateparse # github.com/cpuguy83/go-md2man/v2 v2.0.0 @@ -129,7 +129,7 @@ golang.org/x/sys/cpu golang.org/x/sys/internal/unsafeheader golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed +# golang.org/x/tools v0.0.0-20200721032237-77f530d86f9a golang.org/x/tools/go/analysis golang.org/x/tools/go/analysis/internal/analysisflags golang.org/x/tools/go/analysis/internal/facts