mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Disable vet as part of go test (#33662)
				
					
				
			`go vet` implicitely runs as part of `go test`, but we already have `make lint-go-vet`, so we were essentially running it twice. This should hopefully make `go test` slightly faster. Ref: https://pkg.go.dev/cmd/go#hdr-Test_packages > As part of building a test binary, go test runs go vet
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/pull-compliance.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/pull-compliance.yml
									
									
									
									
										vendored
									
									
								
							@@ -95,7 +95,7 @@ jobs:
 | 
				
			|||||||
          go-version-file: go.mod
 | 
					          go-version-file: go.mod
 | 
				
			||||||
          check-latest: true
 | 
					          check-latest: true
 | 
				
			||||||
      - run: make deps-backend deps-tools
 | 
					      - run: make deps-backend deps-tools
 | 
				
			||||||
      - run: make lint-go-windows lint-go-vet
 | 
					      - run: make lint-go-windows lint-go-gitea-vet
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          TAGS: bindata sqlite sqlite_unlock_notify
 | 
					          TAGS: bindata sqlite sqlite_unlock_notify
 | 
				
			||||||
          GOOS: windows
 | 
					          GOOS: windows
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Makefile
									
									
									
									
									
								
							@@ -73,6 +73,7 @@ EXTRA_GOFLAGS ?=
 | 
				
			|||||||
MAKE_VERSION := $(shell "$(MAKE)" -v | cat | head -n 1)
 | 
					MAKE_VERSION := $(shell "$(MAKE)" -v | cat | head -n 1)
 | 
				
			||||||
MAKE_EVIDENCE_DIR := .make_evidence
 | 
					MAKE_EVIDENCE_DIR := .make_evidence
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GOTESTFLAGS ?= -vet=off
 | 
				
			||||||
ifeq ($(RACE_ENABLED),true)
 | 
					ifeq ($(RACE_ENABLED),true)
 | 
				
			||||||
	GOFLAGS += -race
 | 
						GOFLAGS += -race
 | 
				
			||||||
	GOTESTFLAGS += -race
 | 
						GOTESTFLAGS += -race
 | 
				
			||||||
@@ -311,10 +312,10 @@ lint-frontend: lint-js lint-css ## lint frontend files
 | 
				
			|||||||
lint-frontend-fix: lint-js-fix lint-css-fix ## lint frontend files and fix issues
 | 
					lint-frontend-fix: lint-js-fix lint-css-fix ## lint frontend files and fix issues
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: lint-backend
 | 
					.PHONY: lint-backend
 | 
				
			||||||
lint-backend: lint-go lint-go-vet lint-go-gopls lint-editorconfig ## lint backend files
 | 
					lint-backend: lint-go lint-go-gitea-vet lint-go-gopls lint-editorconfig ## lint backend files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: lint-backend-fix
 | 
					.PHONY: lint-backend-fix
 | 
				
			||||||
lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig ## lint backend files and fix issues
 | 
					lint-backend-fix: lint-go-fix lint-go-gitea-vet lint-editorconfig ## lint backend files and fix issues
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: lint-js
 | 
					.PHONY: lint-js
 | 
				
			||||||
lint-js: node_modules ## lint js files
 | 
					lint-js: node_modules ## lint js files
 | 
				
			||||||
@@ -365,9 +366,9 @@ lint-go-windows:
 | 
				
			|||||||
	@GOOS= GOARCH= $(GO) install $(GOLANGCI_LINT_PACKAGE)
 | 
						@GOOS= GOARCH= $(GO) install $(GOLANGCI_LINT_PACKAGE)
 | 
				
			||||||
	golangci-lint run
 | 
						golangci-lint run
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: lint-go-vet
 | 
					.PHONY: lint-go-gitea-vet
 | 
				
			||||||
lint-go-vet: ## lint go files with vet
 | 
					lint-go-gitea-vet: ## lint go files with gitea-vet
 | 
				
			||||||
	@echo "Running go vet..."
 | 
						@echo "Running gitea-vet..."
 | 
				
			||||||
	@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
 | 
						@GOOS= GOARCH= $(GO) build code.gitea.io/gitea-vet
 | 
				
			||||||
	@$(GO) vet -vettool=gitea-vet ./...
 | 
						@$(GO) vet -vettool=gitea-vet ./...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user