0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-08 11:57:30 -05:00

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`.
This commit is contained in:
silverwind
2025-11-06 21:09:31 +01:00
committed by GitHub
parent eef9406c6b
commit b2feeddf42
4 changed files with 4 additions and 18 deletions

1
.github/labeler.yml vendored
View File

@@ -51,7 +51,6 @@ modifies/internal:
- ".github/**"
- ".gitea/**"
- ".devcontainer/**"
- "build.go"
- "build/**"
- "contrib/**"

View File

@@ -386,8 +386,7 @@ lint-go-windows:
.PHONY: lint-go-gitea-vet
lint-go-gitea-vet: ## lint go files with gitea-vet
@echo "Running gitea-vet..."
@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
@$(GO) vet -vettool=gitea-vet ./...
@$(GO) vet -vettool="$(shell GOOS= GOARCH= go tool -n gitea-vet)" ./...
.PHONY: lint-go-gopls
lint-go-gopls: ## lint go files with gopls

View File

@@ -1,14 +0,0 @@
// Copyright 2020 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
//go:build vendor
package main
// Libraries that are included to vendor utilities used during Makefile build.
// These libraries will not be included in a normal compilation.
import (
// for vet
_ "code.gitea.io/gitea-vet"
)

4
go.mod
View File

@@ -9,7 +9,6 @@ godebug x509negativeserial=1
require (
code.gitea.io/actions-proto-go v0.4.1
code.gitea.io/gitea-vet v0.2.3
code.gitea.io/sdk/gitea v0.22.0
codeberg.org/gusted/mcaptcha v0.0.0-20220723083913-4f3072e1d570
connectrpc.com/connect v1.18.1
@@ -135,6 +134,7 @@ require (
require (
cloud.google.com/go/compute/metadata v0.8.0 // indirect
code.gitea.io/gitea-vet v0.2.3 // indirect
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
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
exclude github.com/goccy/go-json v0.4.11
exclude github.com/satori/go.uuid v1.2.0
tool code.gitea.io/gitea-vet