Skip to content

Commit 836656e

Browse files
fix: github actions
1 parent 110d7c1 commit 836656e

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# https://golangci-lint.run/usage/configuration/
2+
version: "1"
23
linters-settings:
34
govet:
45
check-shadowing: true

.github/.golangci.v2.yml

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

.github/workflows/reviewdog.yml

Lines changed: 6 additions & 2 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,15 @@ jobs:
1518
with:
1619
github_token: ${{ secrets.github_token }}
1720
level: warning
18-
golangci_lint_flags: "--config=.github/.golangci.yml ./testdata"
21+
golangci_lint_flags: "--config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml ./testdata"
1922

2023
golangci-lint-platform:
2124
name: runner / golangci-lint-platform
2225
strategy:
2326
fail-fast: false
2427
matrix:
2528
platform: [ubuntu-latest, macos-latest, windows-latest]
29+
golangci-lint-version: ["v1", "v2"]
2630
runs-on: ${{ matrix.platform }}
2731
steps:
2832
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -32,7 +36,7 @@ jobs:
3236
github_token: ${{ secrets.github_token }}
3337
tool_name: golangci-lint-${{ matrix.platform }}
3438
level: warning
35-
golangci_lint_flags: "--config=.github/.golangci.yml ./testdata --timeout 10m"
39+
golangci_lint_flags: "--config=.github/.golangci.${{ matrix.golangci-lint-version }}.yml ./testdata --timeout 10m"
3640

3741
golangci-lint-github-pr-review:
3842
name: runner / golangci-lint (github-pr-review)

0 commit comments

Comments
 (0)