diff --git a/.golangci-forward.yaml b/.golangci-forward.yaml new file mode 100644 index 000000000..b3bee5422 --- /dev/null +++ b/.golangci-forward.yaml @@ -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 diff --git a/Makefile b/Makefile index e264c357f..f69c3b63c 100644 --- a/Makefile +++ b/Makefile @@ -105,6 +105,7 @@ lint-client: ## Lint client code lint-server: tidy ## Lint server code golangci-lint run --timeout=10m -c .golangci.yaml + golangci-lint run --timeout=10m --new-from-rev=HEAD~ -c .golangci-forward.yaml ##@ Extension .PHONY: dev-extension