Skip to content

Commit 8e12ef9

Browse files
authored
Run go generate and go vet on all packages (go-gitea#30529)
Fixes: go-gitea#30512 I think this does mean those tools would run on a potential `vendor` directory, but I'm not sure we really support vendoring of dependencies anymore. `release` has a `vendor` prerequisite so likely the source tarballs contain vendor files?
1 parent 311f526 commit 8e12ef9

6 files changed

+9
-11
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G
110110

111111
LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64
112112

113-
GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
114113
GO_TEST_PACKAGES ?= $(filter-out $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) code.gitea.io/gitea/tests/integration/migration-test code.gitea.io/gitea/tests code.gitea.io/gitea/tests/integration code.gitea.io/gitea/tests/e2e,$(shell $(GO) list ./... | grep -v /vendor/))
115114
MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...)
116115

@@ -423,7 +422,7 @@ lint-go-windows:
423422
lint-go-vet:
424423
@echo "Running go vet..."
425424
@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
426-
@$(GO) vet -vettool=gitea-vet $(GO_PACKAGES)
425+
@$(GO) vet -vettool=gitea-vet ./...
427426

428427
.PHONY: lint-editorconfig
429428
lint-editorconfig:
@@ -779,7 +778,7 @@ generate-backend: $(TAGS_PREREQ) generate-go
779778
.PHONY: generate-go
780779
generate-go: $(TAGS_PREREQ)
781780
@echo "Running go generate..."
782-
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
781+
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' ./...
783782

784783
.PHONY: security-check
785784
security-check:

tests/integration/api_comment_attachment_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package integration
65

tests/integration/api_issue_attachment_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package integration
65

tests/integration/api_packages_cargo_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2021 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package integration
65

tests/integration/markup_external_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright 2022 The Gitea Authors. All rights reserved.
2-
// Use of this source code is governed by a MIT-style
3-
// license that can be found in the LICENSE file.
2+
// SPDX-License-Identifier: MIT
43

54
package integration
65

tests/integration/repo_mergecommit_revert_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright 2024 The Gitea Authors. All rights reserved.
2+
// SPDX-License-Identifier: MIT
3+
14
package integration
25

36
import (

0 commit comments

Comments
 (0)