Skip to content

Commit 5a4f816

Browse files
fix: github actions
1 parent 110d7c1 commit 5a4f816

File tree

3 files changed

+42
-21
lines changed

3 files changed

+42
-21
lines changed
File renamed without changes.

.github/.golangci.v2.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# https://golangci-lint.run/usage/configuration/
2+
version: "2"
3+
linters-settings:
4+
govet:
5+
check-shadowing: true
6+
misspell:
7+
locale: US
8+
errcheck:
9+
check-type-assertions: false
10+
check-blank: false
11+
12+
linters:
13+
default: none
14+
enable:
15+
- govet
16+
- misspell
17+
- errcheck
18+
exclusions:
19+
presets:
20+
- comments
21+
- common-false-positives
22+
- legacy
23+
- std-error-handling
24+
25+
formatters:
26+
default: none
27+
28+
issues:
29+
max-same-issues: 0

.github/workflows/reviewdog.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ jobs:
77
golangci-lint:
88
name: runner / golangci-lint
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
golangci-lint-version: ["v1", "v2"]
1013
steps:
1114
- name: Check out code into the Go module directory
1215
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -15,14 +18,16 @@ jobs:
1518
with:
1619
github_token: ${{ secrets.github_token }}
1720
level: warning
18-
golangci_lint_flags: "--config=.github/.golangci.yml ./testdata"
21+
golangci_lint_version: ${{ matrix.golangci-lint-version == 'v1' && 'v1.64.8' || 'latest' }}
22+
golangci_lint_flags: "--config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml ./testdata"
1923

2024
golangci-lint-platform:
2125
name: runner / golangci-lint-platform
2226
strategy:
2327
fail-fast: false
2428
matrix:
2529
platform: [ubuntu-latest, macos-latest, windows-latest]
30+
golangci-lint-version: ["v1", "v2"]
2631
runs-on: ${{ matrix.platform }}
2732
steps:
2833
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -32,7 +37,8 @@ jobs:
3237
github_token: ${{ secrets.github_token }}
3338
tool_name: golangci-lint-${{ matrix.platform }}
3439
level: warning
35-
golangci_lint_flags: "--config=.github/.golangci.yml ./testdata --timeout 10m"
40+
golangci_lint_version: ${{ matrix.golangci-lint-version == 'v1' && 'v1.64.8' || 'latest' }}
41+
golangci_lint_flags: "--config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml ./testdata --timeout 10m"
3642

3743
golangci-lint-github-pr-review:
3844
name: runner / golangci-lint (github-pr-review)
@@ -88,7 +94,7 @@ jobs:
8894
github_token: ${{ secrets.github_token }}
8995
tool_name: "golangci-lint-all-in-one"
9096
level: warning
91-
golangci_lint_flags: "--enable-all --exclude-use-default=false ./testdata"
97+
golangci_lint_flags: "--default all ./testdata"
9298

9399
govet:
94100
name: runner / govet
@@ -100,7 +106,7 @@ jobs:
100106
uses: ./
101107
with:
102108
github_token: ${{ secrets.github_token }}
103-
golangci_lint_flags: "--disable-all -E govet ./testdata"
109+
golangci_lint_flags: "--default none -E govet ./testdata"
104110
tool_name: govet
105111

106112
staticcheck:
@@ -113,23 +119,9 @@ jobs:
113119
uses: ./
114120
with:
115121
github_token: ${{ secrets.github_token }}
116-
golangci_lint_flags: "--disable-all -E staticcheck ./testdata"
122+
golangci_lint_flags: "--default none -E staticcheck ./testdata"
117123
tool_name: staticcheck
118124

119-
golint:
120-
name: runner / golint
121-
runs-on: ubuntu-latest
122-
steps:
123-
- name: Check out code into the Go module directory
124-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
125-
- name: golint
126-
uses: ./
127-
with:
128-
github_token: ${{ secrets.github_token }}
129-
golangci_lint_flags: "--disable-all -E golint ./testdata"
130-
tool_name: golint
131-
level: warning
132-
133125
errcheck:
134126
name: runner / errcheck
135127
runs-on: ubuntu-latest
@@ -140,7 +132,7 @@ jobs:
140132
uses: ./
141133
with:
142134
github_token: ${{ secrets.github_token }}
143-
golangci_lint_flags: "--disable-all -E errcheck ./testdata"
135+
golangci_lint_flags: "--default none -E errcheck ./testdata"
144136
tool_name: errcheck
145137
level: warning
146138

@@ -154,7 +146,7 @@ jobs:
154146
uses: ./
155147
with:
156148
github_token: ${{ secrets.github_token }}
157-
golangci_lint_flags: "--disable-all -E misspell ./testdata"
149+
golangci_lint_flags: "--default none -E misspell ./testdata"
158150
tool_name: misspell
159151
level: info
160152

0 commit comments

Comments
 (0)