From 4f3a0a84f7ef8a05e7ecb8a37c79fe054ccb973e Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 22:52:47 +0200 Subject: [PATCH 1/7] Run `go generate` and `go vet` on all packages --- Makefile | 5 ++--- tests/integration/api_comment_attachment_test.go | 1 + tests/integration/api_issue_attachment_test.go | 1 + tests/integration/api_packages_cargo_test.go | 1 + tests/integration/markup_external_test.go | 1 + tests/integration/repo_mergecommit_revert_test.go | 3 +++ 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 594f13ead8acf..1bb79e03374de 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,6 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64 -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/)) 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/)) MIGRATE_TEST_PACKAGES ?= $(shell $(GO) list code.gitea.io/gitea/models/migrations/...) @@ -423,7 +422,7 @@ lint-go-windows: lint-go-vet: @echo "Running go vet..." @GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet - @$(GO) vet -vettool=gitea-vet $(GO_PACKAGES) + @$(GO) vet -vettool=gitea-vet ./... .PHONY: lint-editorconfig lint-editorconfig: @@ -779,7 +778,7 @@ generate-backend: $(TAGS_PREREQ) generate-go .PHONY: generate-go generate-go: $(TAGS_PREREQ) @echo "Running go generate..." - @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES) + @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' ./... .PHONY: security-check security-check: diff --git a/tests/integration/api_comment_attachment_test.go b/tests/integration/api_comment_attachment_test.go index e5e62a86b7be7..730ab079539cf 100644 --- a/tests/integration/api_comment_attachment_test.go +++ b/tests/integration/api_comment_attachment_test.go @@ -1,6 +1,7 @@ // Copyright 2021 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. +// SPDX-License-Identifier: MIT package integration diff --git a/tests/integration/api_issue_attachment_test.go b/tests/integration/api_issue_attachment_test.go index 4b57d387d875d..fa16cf6752512 100644 --- a/tests/integration/api_issue_attachment_test.go +++ b/tests/integration/api_issue_attachment_test.go @@ -1,6 +1,7 @@ // Copyright 2021 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. +// SPDX-License-Identifier: MIT package integration diff --git a/tests/integration/api_packages_cargo_test.go b/tests/integration/api_packages_cargo_test.go index c0705e0de5cf4..79ac028bf1e8e 100644 --- a/tests/integration/api_packages_cargo_test.go +++ b/tests/integration/api_packages_cargo_test.go @@ -1,6 +1,7 @@ // Copyright 2021 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. +// SPDX-License-Identifier: MIT package integration diff --git a/tests/integration/markup_external_test.go b/tests/integration/markup_external_test.go index 5f102f8d62af5..70cb8c367004e 100644 --- a/tests/integration/markup_external_test.go +++ b/tests/integration/markup_external_test.go @@ -1,6 +1,7 @@ // Copyright 2022 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. +// SPDX-License-Identifier: MIT package integration diff --git a/tests/integration/repo_mergecommit_revert_test.go b/tests/integration/repo_mergecommit_revert_test.go index 4d612bdcdb685..103fb47e2b4f8 100644 --- a/tests/integration/repo_mergecommit_revert_test.go +++ b/tests/integration/repo_mergecommit_revert_test.go @@ -1,3 +1,6 @@ +// Copyright 2024 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + package integration import ( From d133ccca71fb7af8942d9f526ddfb89017dd6bc7 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:11:54 +0200 Subject: [PATCH 2/7] Update tests/integration/repo_mergecommit_revert_test.go --- tests/integration/repo_mergecommit_revert_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/repo_mergecommit_revert_test.go b/tests/integration/repo_mergecommit_revert_test.go index 103fb47e2b4f8..ac820d1b70a9b 100644 --- a/tests/integration/repo_mergecommit_revert_test.go +++ b/tests/integration/repo_mergecommit_revert_test.go @@ -1,4 +1,6 @@ // Copyright 2024 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. // SPDX-License-Identifier: MIT package integration From 059941c76845ebb3f3ec9936c630acfc6cb36ea7 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:48:21 +0200 Subject: [PATCH 3/7] Update tests/integration/api_comment_attachment_test.go --- tests/integration/api_comment_attachment_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/api_comment_attachment_test.go b/tests/integration/api_comment_attachment_test.go index 730ab079539cf..2d7587bbde9f6 100644 --- a/tests/integration/api_comment_attachment_test.go +++ b/tests/integration/api_comment_attachment_test.go @@ -1,6 +1,4 @@ // Copyright 2021 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. // SPDX-License-Identifier: MIT package integration From b196dd739ff0e99d66b0d903368cbc729a6cf67b Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:48:35 +0200 Subject: [PATCH 4/7] Update tests/integration/api_issue_attachment_test.go --- tests/integration/api_issue_attachment_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/api_issue_attachment_test.go b/tests/integration/api_issue_attachment_test.go index fa16cf6752512..497dd0155e0b0 100644 --- a/tests/integration/api_issue_attachment_test.go +++ b/tests/integration/api_issue_attachment_test.go @@ -1,6 +1,4 @@ // Copyright 2021 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. // SPDX-License-Identifier: MIT package integration From b3855e9f4fe712444ebc7be8bc4261a4d0a5f071 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:48:50 +0200 Subject: [PATCH 5/7] Update tests/integration/api_packages_cargo_test.go --- tests/integration/api_packages_cargo_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/api_packages_cargo_test.go b/tests/integration/api_packages_cargo_test.go index 79ac028bf1e8e..3fb968765363e 100644 --- a/tests/integration/api_packages_cargo_test.go +++ b/tests/integration/api_packages_cargo_test.go @@ -1,6 +1,4 @@ // Copyright 2021 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. // SPDX-License-Identifier: MIT package integration From 0069cc832fd20bb19f1cc0a98b33f801557820c2 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:52:07 +0200 Subject: [PATCH 6/7] Update tests/integration/markup_external_test.go --- tests/integration/markup_external_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/markup_external_test.go b/tests/integration/markup_external_test.go index 70cb8c367004e..e50f5c1356e22 100644 --- a/tests/integration/markup_external_test.go +++ b/tests/integration/markup_external_test.go @@ -1,6 +1,4 @@ // Copyright 2022 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. // SPDX-License-Identifier: MIT package integration From 3b1502e976dd58ee7719b8d84b7a27b3bb29979e Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 16 Apr 2024 23:52:22 +0200 Subject: [PATCH 7/7] Update tests/integration/repo_mergecommit_revert_test.go --- tests/integration/repo_mergecommit_revert_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration/repo_mergecommit_revert_test.go b/tests/integration/repo_mergecommit_revert_test.go index ac820d1b70a9b..103fb47e2b4f8 100644 --- a/tests/integration/repo_mergecommit_revert_test.go +++ b/tests/integration/repo_mergecommit_revert_test.go @@ -1,6 +1,4 @@ // Copyright 2024 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. // SPDX-License-Identifier: MIT package integration