chore(golangci-lint): add forward-looking static checking rules BE-12183 (#1200)

pull/12855/head^2
andres-portainer 2025-09-12 16:54:30 -03:00 committed by GitHub
parent ad1c015f01
commit eef54f4153
2 changed files with 12 additions and 0 deletions

11
.golangci-forward.yaml Normal file
View File

@ -0,0 +1,11 @@
version: "2"
linters:
default: none
enable:
- forbidigo
settings:
forbidigo:
forbid:
- pattern: ^dataservices.DataStore.(EdgeGroup|EdgeJob|EdgeStack|EndpointRelation|Endpoint|GitCredential|Registry|ResourceControl|Role|Settings|Snapshot|Stack|Tag|User)$
msg: Use a transaction instead
analyze-types: true

View File

@ -105,6 +105,7 @@ lint-client: ## Lint client code
lint-server: tidy ## Lint server code lint-server: tidy ## Lint server code
golangci-lint run --timeout=10m -c .golangci.yaml golangci-lint run --timeout=10m -c .golangci.yaml
golangci-lint run --timeout=10m --new-from-rev=HEAD~ -c .golangci-forward.yaml
##@ Extension ##@ Extension
.PHONY: dev-extension .PHONY: dev-extension