From 76225c0813486d49a05bc68bef75573fdec2460e Mon Sep 17 00:00:00 2001 From: Andrew Nikitin Date: Tue, 9 Apr 2024 10:13:31 +0200 Subject: [PATCH] Make lint the same as cheqd-node --- .github/linters/.golangci.yaml | 17 +++++++++++++++-- .github/workflows/lint.yml | 2 +- go.mod | 2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/linters/.golangci.yaml b/.github/linters/.golangci.yaml index 2ca14909..9f1ed58e 100644 --- a/.github/linters/.golangci.yaml +++ b/.github/linters/.golangci.yaml @@ -42,7 +42,7 @@ linters-settings: - badCall # Remove this after CI workflow PR gofumpt: - lang-version: "1.18" + lang-version: "1.21" misspell: ignore-words: @@ -52,7 +52,7 @@ linters-settings: stylecheck: # Select the Go version to target. - go: "1.18" + go: "1.21" # STxxxx checks in https://staticcheck.io/docs/configuration/options/#checks # Default: ["*"] checks: ["all"] @@ -62,3 +62,16 @@ linters-settings: - "github.com/onsi/gomega" # https://staticcheck.io/docs/configuration/options/#initialisms initialisms: ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS", "SIP", "RTP", "AMQP", "DB", "TS"] + + depguard: + rules: + main: + files: + - $all + list-mode: lax + allow: "*" + + goconst: + min-occurrences: 5 + ignore-tests: true + ignore-strings: "echo '" \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d214e74..32987190 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,7 +40,7 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v4 with: - version: v1.55.2 + version: v1.56.2 args: --config .github/linters/.golangci.yaml super-lint: diff --git a/go.mod b/go.mod index a465eb35..57ed650f 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/cheqd/did-resolver go 1.21 +toolchain go1.21.0 + require ( github.com/cheqd/cheqd-node/api/v2 v2.2.0-develop.1 github.com/go-resty/resty/v2 v2.11.0