From 9d4a45c3c3293aeae0df3e5b94587e73d002a523 Mon Sep 17 00:00:00 2001 From: dongjiang Date: Fri, 31 Oct 2025 19:16:04 +0800 Subject: [PATCH] add golangci lint rule Signed-off-by: dongjiang --- .golangci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 5f8edd56b4..88fa35359e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,6 +11,7 @@ linters: - bidichk - bodyclose - copyloopvar + - depguard - dogsled - dupl - errcheck @@ -42,6 +43,12 @@ linters: - unused - whitespace settings: + depguard: + rules: + forbid-pkg-errors: + deny: + - pkg: sort + desc: Should be replaced with slices package forbidigo: forbid: - pattern: context.Background