Skip to content

Commit b2feedd

Browse files
authored
Move gitea-vet to use go tool (#35878)
Add it as a [tool dependency](https://go.dev/doc/modules/managing-dependencies#tools), eliminating the need for `build.go`.
1 parent eef9406 commit b2feedd

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

.github/labeler.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ modifies/internal:
5151
- ".github/**"
5252
- ".gitea/**"
5353
- ".devcontainer/**"
54-
- "build.go"
5554
- "build/**"
5655
- "contrib/**"
5756

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,7 @@ lint-go-windows:
386386
.PHONY: lint-go-gitea-vet
387387
lint-go-gitea-vet: ## lint go files with gitea-vet
388388
@echo "Running gitea-vet..."
389-
@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
390-
@$(GO) vet -vettool=gitea-vet ./...
389+
@$(GO) vet -vettool="$(shell GOOS= GOARCH= go tool -n gitea-vet)" ./...
391390

392391
.PHONY: lint-go-gopls
393392
lint-go-gopls: ## lint go files with gopls

build.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ godebug x509negativeserial=1
99

1010
require (
1111
code.gitea.io/actions-proto-go v0.4.1
12-
code.gitea.io/gitea-vet v0.2.3
1312
code.gitea.io/sdk/gitea v0.22.0
1413
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
1514
connectrpc.com/connect v1.18.1
@@ -135,6 +134,7 @@ require (
135134

136135
require (
137136
cloud.google.com/go/compute/metadata v0.8.0 // indirect
137+
code.gitea.io/gitea-vet v0.2.3 // indirect
138138
dario.cat/mergo v1.0.2 // indirect
139139
filippo.io/edwards25519 v1.1.0 // indirect
140140
git.sr.ht/~mariusor/go-xsd-duration v0.0.0-20220703122237-02e73435a078 // indirect
@@ -307,3 +307,5 @@ exclude github.com/gofrs/uuid v4.0.0+incompatible
307307
exclude github.com/goccy/go-json v0.4.11
308308

309309
exclude github.com/satori/go.uuid v1.2.0
310+
311+
tool code.gitea.io/gitea-vet

0 commit comments

Comments
 (0)