diff --git a/.github/workflows/go-tests.yaml b/.github/workflows/go-tests.yaml index 3e01fa3e1..e4ac166fb 100644 --- a/.github/workflows/go-tests.yaml +++ b/.github/workflows/go-tests.yaml @@ -23,14 +23,14 @@ jobs: with: egress-policy: audit + - name: Checkout code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: '1.21' + go-version-file: go.mod check-latest: true - - name: Checkout code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - uses: chainguard-dev/actions/goimports@main - name: install libyara-dev diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 58675bf09..fe5374054 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -23,7 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: '1.21' + go-version-file: go.mod check-latest: true - uses: chainguard-dev/actions/gofmt@main @@ -40,7 +40,7 @@ jobs: - name: Set up Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: '1.21' + go-version-file: go.mod check-latest: true - uses: chainguard-dev/actions/goimports@main @@ -55,7 +55,7 @@ jobs: - name: Set up Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: '1.21' + go-version-file: go.mod check-latest: true - name: install libyara-dev @@ -70,7 +70,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@82d40c283aeb1f2b6595839195e95c2d6a49081b # v3.7.1 with: - version: v1.57 + version: v1.58 args: --timeout=5m lint: @@ -84,7 +84,7 @@ jobs: - name: Set up Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: - go-version: '1.21' + go-version-file: go.mod check-latest: true - uses: reviewdog/action-misspell@5bd7be2fc7ae56a517184f5c4bbcf2fd7afe3927 # v1.17.0 diff --git a/.golangci.yml b/.golangci.yml index 828278c7a..66ee71593 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,7 @@ run: # The default runtime timeout is 1m, which doesn't work well on Github Actions. timeout: 10m + go: "1.22" # NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten. linters-settings: @@ -91,12 +92,6 @@ linters-settings: - name: unconditional-recursion - name: waitgroup-by-value - staticcheck: - go: "1.18" - - unused: - go: "1.18" - output: sort-results: true diff --git a/Makefile b/Makefile index 8cbbdb5b2..f0061f60e 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ LINTERS := FIXERS := GOLANGCI_LINT_CONFIG := $(LINT_ROOT)/.golangci.yml -GOLANGCI_LINT_VERSION ?= v1.56.2 +GOLANGCI_LINT_VERSION ?= v1.58.0 GOLANGCI_LINT_BIN := $(LINT_ROOT)/out/linters/golangci-lint-$(GOLANGCI_LINT_VERSION)-$(LINT_ARCH) $(GOLANGCI_LINT_BIN): mkdir -p $(LINT_ROOT)/out/linters