From 3759c78572ffb09eb7e2ebfe66ab3074aebe3572 Mon Sep 17 00:00:00 2001 From: ElecTwix Date: Wed, 15 May 2024 20:37:46 +0300 Subject: [PATCH] Fix linter errors Updated lint.yml and .golangci.yaml Bumped .golangci linter version --- .github/workflows/lint.yml | 12 ++++++------ .golangci.yml | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1302d11..d377bb1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,16 +12,16 @@ permissions: jobs: golangci: permissions: - contents: read # for actions/checkout to fetch code - pull-requests: read # for golangci/golangci-lint-action to fetch pull requests + contents: read # for actions/checkout to fetch code + pull-requests: read # for golangci/golangci-lint-action to fetch pull requests name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: - go-version: '>=1.18' - - uses: actions/checkout@v3 + go-version: ">=1.18" + - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v5 with: args: --timeout=5m diff --git a/.golangci.yml b/.golangci.yml index cbad97e..95db2d0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,7 +26,7 @@ linters-settings: min-complexity: 15 goimports: local-prefixes: github.com/golangci/golangci-lint - gomnd: + mnd: # don't include the "operation" and "assign" checks: - argument @@ -34,15 +34,16 @@ linters-settings: - condition - return ignored-numbers: - - '0' - - '1' - - '2' - - '3' + - "0" + - "1" + - "2" + - "3" ignored-functions: - strings.SplitN govet: - check-shadowing: true + enable: + - shadow lll: line-length: 140 misspell: