adopt golangci-lint v2 (#31222)
* adopt golangci-lint v2 No actual linting changes in this commit, just upgraded tooling and directives to ignore new linter rules. Adopting v2 solves some gosec issues in v1 and also happens to be a nice performance boost! As part of this PR, we also drop support for `MM_NO_ENTERPRISE_LINT` which hasn't been need for a while anyway. * simplify: go install is fine! * missing GOBIN * golangci-lint: drop legacy preset exclusion
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
761584c040
Коммит
e04f487cb8
@@ -300,15 +300,11 @@ golang-versions: ## Install Golang versions used for compatibility testing (e.g.
|
||||
export GO_COMPATIBILITY_TEST_VERSIONS="${GO_COMPATIBILITY_TEST_VERSIONS}"
|
||||
|
||||
golangci-lint: ## Run golangci-lint on codebase
|
||||
$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.7
|
||||
|
||||
@echo Running golangci-lint
|
||||
$(GOBIN)/golangci-lint run ./...
|
||||
$(GOBIN)/golangci-lint run ./public/...
|
||||
$(GO) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
ifneq ($(MM_NO_ENTERPRISE_LINT),true)
|
||||
$(GOBIN)/golangci-lint run $(BUILD_ENTERPRISE_DIR)/...
|
||||
endif
|
||||
$(GOBIN)/golangci-lint run ./... ./public/... $(BUILD_ENTERPRISE_DIR)/...
|
||||
else
|
||||
$(GOBIN)/golangci-lint run ./... ./public/...
|
||||
endif
|
||||
|
||||
i18n-extract: ## Extract strings for translation from the source code
|
||||
|
||||
Ссылка в новой задаче
Block a user