From 0a5048d7a821071c0facefd69a4f1a8470220fd0 Mon Sep 17 00:00:00 2001 From: jeronimoalbi Date: Thu, 9 Nov 2023 12:50:50 +0100 Subject: [PATCH] ci: add golangci depguard rule for the errors package --- .golangci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index ed09a7a08e..15ee166466 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,7 +10,7 @@ linters: enable: - bodyclose - decorder - # - depguard + - depguard - dogsled - dupword # - errcheck @@ -45,6 +45,16 @@ linters: # - wrapcheck # - wsl +linters-settings: + depguard: + rules: + main: + deny: + - pkg: "errors" + desc: Should be replaced by 'errors "github.com/ignite/cli/ignite/pkg/xerrors"' + - pkg: "github.com/pkg/errors" + desc: Should be replaced by 'errors "github.com/ignite/cli/ignite/pkg/xerrors"' + issues: max-issues-per-linter: 0 max-same-issues: 0