diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yaml similarity index 78% rename from .github/workflows/tests.yml rename to .github/workflows/tests.yaml index edfe942b..6ffaffcb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yaml @@ -21,16 +21,16 @@ 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 + 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$