From 08d59339988c0a54c0454fbffee92fafdbc39014 Mon Sep 17 00:00:00 2001 From: Alex Barter Date: Sun, 26 Nov 2023 14:58:02 +0000 Subject: [PATCH] Update GolangCI Lint to v1.55.2 & fix lint violations --- .circleci/config.yml | 2 +- .golangci.yaml | 10 ++++++++++ errors.go | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 95145f7..2c1191d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,4 +36,4 @@ workflows: jobs: - test - golangci-lint/lint: - tag: v1.52.2 + tag: v1.55.2 diff --git a/.golangci.yaml b/.golangci.yaml index 7d87d0d..70843f5 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -9,6 +9,16 @@ linters: - maligned # deprecated and replaced by official fieldalignment. linters-settings: + depguard: + rules: + # Only allow imports from the stdlib & this module + all: + list-mode: strict + files: + - $all + allow: + - $gostd + - github.com/percivalalb/sipuri varnamelen: max-distance: 17 # default of 5 makes the linter annoying to use. diff --git a/errors.go b/errors.go index 8e713e3..9c7b71d 100644 --- a/errors.go +++ b/errors.go @@ -97,7 +97,7 @@ func (e EscapeError) Error() string { // Is makes EscapeError useable with errors.Is. func (e EscapeError) Is(input error) bool { - _, ok := input.(EscapeError) //nolint:errorlint + _, ok := input.(EscapeError) return ok }