Skip to content

Commit 1b73c62

Browse files
authored
Revert "feat: golangci-lint v2 support (golangci#1198)"
This reverts commit efa094a.
1 parent f3bdef3 commit 1b73c62

File tree

15 files changed

+165
-106
lines changed

15 files changed

+165
-106
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ jobs:
5454
version:
5555
- ""
5656
- "latest"
57-
- "v2.0"
58-
- "v2.0.0"
57+
- "v1.63" # TODO(ldez): it should be updated for v2.
58+
- "v1.63.4" # TODO(ldez): it should be updated for v2.
5959
runs-on: ${{ matrix.os }}
6060
permissions:
6161
contents: read
@@ -83,8 +83,8 @@ jobs:
8383
version:
8484
- ""
8585
- "latest"
86-
- "v2.0.0"
87-
- "1f032fbc4b117e4247b19ff606cc847ab5383bc9"
86+
- "v1.63.4" # TODO(ldez): it should be updated for v2.
87+
- "95c39ac1fbaf66475705c06c16259ffd9d6bf9a2" # TODO(ldez): it should be updated for v2.
8888
runs-on: ${{ matrix.os }}
8989
permissions:
9090
contents: read

.golangci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
version: "2"
2-
31
output:
42
show-stats: true
3+
sort-results: true
54
sort-order:
6-
- file
75
- linter
6+
- file

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
with:
5555
go-version: stable
5656
- name: golangci-lint
57-
uses: golangci/golangci-lint-action@v7
57+
uses: golangci/golangci-lint-action@v6
5858
with:
59-
version: v2.0
59+
version: v1.64
6060
```
6161
6262
</details>
@@ -92,9 +92,9 @@ jobs:
9292
with:
9393
go-version: ${{ matrix.go }}
9494
- name: golangci-lint
95-
uses: golangci/golangci-lint-action@v7
95+
uses: golangci/golangci-lint-action@v6
9696
with:
97-
version: v2.0
97+
version: v1.64
9898
```
9999
100100
You will also likely need to add the following `.gitattributes` file to ensure that line endings for Windows builds are properly formatted:
@@ -120,7 +120,7 @@ on:
120120
121121
env:
122122
GO_VERSION: stable
123-
GOLANGCI_LINT_VERSION: v2.0
123+
GOLANGCI_LINT_VERSION: v1.64
124124
125125
jobs:
126126
detect-modules:
@@ -147,7 +147,7 @@ jobs:
147147
with:
148148
go-version: ${{ env.GO_VERSION }}
149149
- name: golangci-lint ${{ matrix.modules }}
150-
uses: golangci/golangci-lint-action@v7
150+
uses: golangci/golangci-lint-action@v6
151151
with:
152152
version: ${{ env.GOLANGCI_LINT_VERSION }}
153153
working-directory: ${{ matrix.modules }}
@@ -179,7 +179,7 @@ jobs:
179179
with:
180180
os: ${{ matrix.os }}
181181
go-version: ${{ matrix.go-version }}
182-
golangci-lint-version: v2.0
182+
golangci-lint-version: v1.64
183183
```
184184

185185
```yaml
@@ -201,7 +201,7 @@ on:
201201
golangci-lint-version:
202202
description: 'Golangci-lint version'
203203
type: string
204-
default: 'v2.0'
204+
default: 'v1.64'
205205
206206
jobs:
207207
detect-modules:
@@ -229,7 +229,7 @@ jobs:
229229
with:
230230
go-version: ${{ inputs.go-version }}
231231
- name: golangci-lint ${{ matrix.modules }}
232-
uses: golangci/golangci-lint-action@v7
232+
uses: golangci/golangci-lint-action@v6
233233
with:
234234
version: ${{ inputs.golangci-lint-version }}
235235
working-directory: ${{ matrix.modules }}
@@ -245,7 +245,6 @@ You will also likely need to add the following `.gitattributes` file to ensure t
245245

246246
## Compatibility
247247

248-
* `v7.0.0` supports golangci-lint v2 only.
249248
* `v6.0.0+` removes `annotations` option, removes the default output format (`github-actions`).
250249
* `v5.0.0+` removes `skip-pkg-cache` and `skip-build-cache` because the cache related to Go itself is already handled by `actions/setup-go`.
251250
* `v4.0.0+` requires an explicit `actions/setup-go` installation step before using this action: `uses: actions/setup-go@v5`.
@@ -263,17 +262,17 @@ You will also likely need to add the following `.gitattributes` file to ensure t
263262
The version of golangci-lint to use.
264263

265264
When `install-mode` is:
266-
* `binary` (default): the value can be v2.3 or v2.3.4 or `latest` to use the latest version.
267-
* `goinstall`: the value can be v2.3.4, `latest`, or the hash of a commit.
265+
* `binary` (default): the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
266+
* `goinstall`: the value can be v1.2.3, `latest`, or the hash of a commit.
268267
* `none`: the value is ignored.
269268

270269
<details>
271270
<summary>Example</summary>
272271

273272
```yml
274-
uses: golangci/golangci-lint-action@v7
273+
uses: golangci/golangci-lint-action@v6
275274
with:
276-
version: v2.0
275+
version: v1.58
277276
# ...
278277
```
279278

@@ -291,7 +290,7 @@ The default value is `binary`.
291290
<summary>Example</summary>
292291

293292
```yml
294-
uses: golangci/golangci-lint-action@v7
293+
uses: golangci/golangci-lint-action@v6
295294
with:
296295
install-mode: "goinstall"
297296
# ...
@@ -311,7 +310,7 @@ By default, it uses the `github.token` from the action.
311310
<summary>Example</summary>
312311

313312
```yml
314-
uses: golangci/golangci-lint-action@v7
313+
uses: golangci/golangci-lint-action@v6
315314
with:
316315
github-token: xxx
317316
# ...
@@ -334,7 +333,7 @@ The JSONSchema used to validate the configuration depends on the version of gola
334333
<summary>Example</summary>
335334

336335
```yml
337-
uses: golangci/golangci-lint-action@v7
336+
uses: golangci/golangci-lint-action@v6
338337
with:
339338
verify: false
340339
# ...
@@ -359,7 +358,7 @@ The default value is `false`.
359358
<summary>Example</summary>
360359

361360
```yml
362-
uses: golangci/golangci-lint-action@v7
361+
uses: golangci/golangci-lint-action@v6
363362
with:
364363
only-new-issues: true
365364
# ...
@@ -377,7 +376,7 @@ Working directory, useful for monorepos.
377376
<summary>Example</summary>
378377

379378
```yml
380-
uses: golangci/golangci-lint-action@v7
379+
uses: golangci/golangci-lint-action@v6
381380
with:
382381
working-directory: somedir
383382
# ...
@@ -398,9 +397,9 @@ The location of the configuration file can be changed by using `--config=`
398397
<summary>Example</summary>
399398

400399
```yml
401-
uses: golangci/golangci-lint-action@v7
400+
uses: golangci/golangci-lint-action@v6
402401
with:
403-
args: --config=/my/path/.golangci.yml --issues-exit-code=0
402+
args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
404403
# ...
405404
```
406405

@@ -412,7 +411,7 @@ with:
412411

413412
Force the usage of the embedded problem matchers.
414413

415-
By default, the [problem matcher of Go (`actions/setup-go`)](https://github.com/actions/setup-go/blob/main/matchers.json) already handles the default golangci-lint output (`text`).
414+
By default, the [problem matcher of Go (`actions/setup-go`)](https://github.com/actions/setup-go/blob/main/matchers.json) already handles the golangci-lint output (`colored-line-number`).
416415

417416
Works only with `colored-line-number` (the golangci-lint default).
418417

@@ -424,7 +423,7 @@ The default value is `false`.
424423
<summary>Example</summary>
425424

426425
```yml
427-
uses: golangci/golangci-lint-action@v7
426+
uses: golangci/golangci-lint-action@v6
428427
with:
429428
problem-matchers: true
430429
# ...
@@ -445,7 +444,7 @@ The default value is `false`.
445444
<summary>Example</summary>
446445

447446
```yml
448-
uses: golangci/golangci-lint-action@v7
447+
uses: golangci/golangci-lint-action@v6
449448
with:
450449
skip-cache: true
451450
# ...
@@ -465,7 +464,7 @@ The default value is `false`.
465464
<summary>Example</summary>
466465

467466
```yml
468-
uses: golangci/golangci-lint-action@v7
467+
uses: golangci/golangci-lint-action@v6
469468
with:
470469
skip-save-cache: true
471470
# ...
@@ -487,7 +486,7 @@ If set the number is `<= 0`, the cache will be always invalidate (Not recommende
487486
<summary>Example</summary>
488487

489488
```yml
490-
uses: golangci/golangci-lint-action@v7
489+
uses: golangci/golangci-lint-action@v6
491490
with:
492491
cache-invalidation-interval: 15
493492
# ...
@@ -516,7 +515,7 @@ permissions:
516515
pull-requests: read
517516
```
518517
519-
For annotations to work use the default format output (`text`) and either use `actions/setup-go` in the job or enable the internal [problem matchers](#problem-matchers).
518+
For annotations to work use the default `colored-line-number` output and either use `actions/setup-go` in the job or enable the internal [problem matchers](#problem-matchers).
520519

521520
## Performance
522521

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ inputs:
77
description: |
88
The version of golangci-lint to use.
99
When `install-mode` is:
10-
- `binary` (default): the value can be v2.3 or v2.3.4 or `latest` to use the latest version.
11-
- `goinstall`: the value can be v2.3.4, `latest`, or the hash of a commit.
10+
- `binary` (default): the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
11+
- `goinstall`: the value can be v1.2.3, `latest`, or the hash of a commit.
1212
- `none`: the value is ignored.
1313
required: false
1414
install-mode:

dist/post_run/index.js

Lines changed: 39 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)