Skip to content

Commit 7fe05ca

Browse files
committed
Update golangci integration
1 parent cbaa17d commit 7fe05ca

3 files changed

Lines changed: 7 additions & 39 deletions

File tree

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,18 @@ on:
77

88
permissions:
99
contents: read
10-
# Optional: allow read access to pull request. Use with `only-new-issues` option.
1110
pull-requests: read
1211

1312
jobs:
1413
golangci:
1514
name: lint
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions/setup-go@v5
17+
- uses: actions/checkout@v5
18+
- uses: actions/setup-go@v6
2019
with:
21-
go-version: '1.24'
22-
cache: false
20+
go-version: stable
2321
- name: golangci-lint
24-
uses: golangci/golangci-lint-action@v6
22+
uses: golangci/golangci-lint-action@v8
2523
with:
26-
# Require: The version of golangci-lint to use.
27-
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
28-
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
29-
version: v1.64
30-
31-
# Optional: working directory, useful for monorepos
32-
# working-directory: somedir
33-
34-
# Optional: golangci-lint command line arguments.
35-
#
36-
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
37-
# The location of the configuration file can be changed by using `--config=`
38-
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
39-
40-
# Optional: show only new issues if it's a pull request. The default value is `false`.
41-
# only-new-issues: true
42-
43-
# Optional: if set to true, then all caching functionality will be completely disabled,
44-
# takes precedence over all other caching options.
45-
# skip-cache: true
46-
47-
# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
48-
# skip-pkg-cache: true
49-
50-
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
51-
# skip-build-cache: true
52-
53-
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
54-
# install-mode: "goinstall"
24+
version: v2.1

.github/workflows/unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup Go
1515
uses: actions/setup-go@v4
1616
with:
17-
go-version: '1.24.x'
17+
go-version: '1.25.x'
1818
- name: Install dependencies
1919
run: go mod download
2020
- name: Test with the Go CLI

.golangci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
version: '2'
12
linters:
23
# Enable specific linter
34
# https://golangci-lint.run/usage/linters/#enabled-by-default
45
enable:
56
- staticcheck
67
- govet
7-
output:
8-
formats:
9-
- format: colored-line-number

0 commit comments

Comments
 (0)