From aa17adf920297d2ea9138d81ca233bda59447899 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 11:51:01 +0000 Subject: [PATCH 1/2] Bump the gh-dependency group in /.github/workflows with 2 updates Bumps the gh-dependency group in /.github/workflows with 2 updates: [actions/setup-go](https://github.com/actions/setup-go) and [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action). Updates `actions/setup-go` from 4 to 5 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v4...v5) Updates `golangci/golangci-lint-action` from 7 to 8 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v7...v8) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-dependency - dependency-name: golangci/golangci-lint-action dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: gh-dependency ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index edfe942b..1287b403 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,13 +21,13 @@ jobs: uses: actions/checkout@v4 - name: Setup Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.22.x cache-dependency-path: "go.sum" - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: version: v2.0.2 args: --config .golangci.yml From 3723d3b87148f4f0e49253650b0d5ad52f0f93ed Mon Sep 17 00:00:00 2001 From: Dusan Borovcanin Date: Wed, 14 May 2025 13:57:37 +0200 Subject: [PATCH 2/2] Fix GolanCI linter conifg Signed-off-by: Dusan Borovcanin --- .github/workflows/{tests.yml => tests.yaml} | 4 ++-- .golangci.yml => .golangci.yaml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) rename .github/workflows/{tests.yml => tests.yaml} (90%) rename .golangci.yml => .golangci.yaml (80%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yaml similarity index 90% rename from .github/workflows/tests.yml rename to .github/workflows/tests.yaml index 1287b403..6ffaffcb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yaml @@ -29,8 +29,8 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.0.2 - args: --config .golangci.yml + version: v2.1.6 + args: --config .golangci.yaml - name: Build Binaries run: | diff --git a/.golangci.yml b/.golangci.yaml similarity index 80% rename from .golangci.yml rename to .golangci.yaml index b855bb07..d5d233cc 100644 --- a/.golangci.yml +++ b/.golangci.yaml @@ -1,10 +1,18 @@ +# Copyright (c) Abstract Machines +# SPDX-License-Identifier: Apache-2.0 + version: "2" +run: + timeout: 10m + build-tags: + - nats linters: default: none enable: - asasalint - asciicheck - bidichk + - contextcheck - copyloopvar - decorder - dogsled @@ -70,6 +78,15 @@ linters: - common-false-positives - legacy - std-error-handling + rules: + - path: (.+)\.go$ + text: |- + string `Usage: + ` has (\d+) occurrences, make it a constant + - path: (.+)\.go$ + text: |- + string `For example: + ` has (\d+) occurrences, make it a constant paths: - third_party$ - builtin$