Skip to content

Commit 7774f98

Browse files
authored
feat: use absolute paths by default when using working-directory option (#1231)
1 parent 9fae48a commit 7774f98

File tree

10 files changed

+675
-435
lines changed

10 files changed

+675
-435
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+
- "v2.1"
58+
- "v2.1.0"
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+
- "v2.1.0"
87+
- "f6c2e6c999dfae444d1fe7f1b0d49becdae44547"
8888
runs-on: ${{ matrix.os }}
8989
permissions:
9090
contents: read

README.md

Lines changed: 19 additions & 20 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@v8
5858
with:
59-
version: v2.0
59+
version: v2.1
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@v8
9696
with:
97-
version: v2.0
97+
version: v2.1
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:
@@ -147,11 +147,10 @@ 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@v8
151151
with:
152152
version: ${{ env.GOLANGCI_LINT_VERSION }}
153153
working-directory: ${{ matrix.modules }}
154-
args: --path-mode=abs
155154
```
156155

157156
</details>
@@ -230,11 +229,10 @@ jobs:
230229
with:
231230
go-version: ${{ inputs.go-version }}
232231
- name: golangci-lint ${{ matrix.modules }}
233-
uses: golangci/golangci-lint-action@v7
232+
uses: golangci/golangci-lint-action@v8
234233
with:
235234
version: ${{ inputs.golangci-lint-version }}
236235
working-directory: ${{ matrix.modules }}
237-
args: --path-mode=abs
238236
```
239237

240238
You will also likely need to add the following `.gitattributes` file to ensure that line endings for Windows builds are properly formatted:
@@ -247,6 +245,7 @@ You will also likely need to add the following `.gitattributes` file to ensure t
247245

248246
## Compatibility
249247

248+
* `v8.0.0` works with `golangci-lint` version >= `v2.1.0`
250249
* `v7.0.0` supports golangci-lint v2 only.
251250
* `v6.0.0+` removes `annotations` option, removes the default output format (`github-actions`).
252251
* `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`.
@@ -273,9 +272,9 @@ When `install-mode` is:
273272
<summary>Example</summary>
274273

275274
```yml
276-
uses: golangci/golangci-lint-action@v7
275+
uses: golangci/golangci-lint-action@v8
277276
with:
278-
version: v2.0
277+
version: v2.1
279278
# ...
280279
```
281280

@@ -293,7 +292,7 @@ The default value is `binary`.
293292
<summary>Example</summary>
294293

295294
```yml
296-
uses: golangci/golangci-lint-action@v7
295+
uses: golangci/golangci-lint-action@v8
297296
with:
298297
install-mode: "goinstall"
299298
# ...
@@ -313,7 +312,7 @@ By default, it uses the `github.token` from the action.
313312
<summary>Example</summary>
314313

315314
```yml
316-
uses: golangci/golangci-lint-action@v7
315+
uses: golangci/golangci-lint-action@v8
317316
with:
318317
github-token: xxx
319318
# ...
@@ -336,7 +335,7 @@ The JSON Schema used to validate the configuration depends on the version of gol
336335
<summary>Example</summary>
337336

338337
```yml
339-
uses: golangci/golangci-lint-action@v7
338+
uses: golangci/golangci-lint-action@v8
340339
with:
341340
verify: false
342341
# ...
@@ -361,7 +360,7 @@ The default value is `false`.
361360
<summary>Example</summary>
362361

363362
```yml
364-
uses: golangci/golangci-lint-action@v7
363+
uses: golangci/golangci-lint-action@v8
365364
with:
366365
only-new-issues: true
367366
# ...
@@ -379,7 +378,7 @@ Working directory, useful for monorepos.
379378
<summary>Example</summary>
380379

381380
```yml
382-
uses: golangci/golangci-lint-action@v7
381+
uses: golangci/golangci-lint-action@v8
383382
with:
384383
working-directory: somedir
385384
# ...
@@ -404,7 +403,7 @@ golangci-lint command line arguments.
404403
<summary>Example</summary>
405404

406405
```yml
407-
uses: golangci/golangci-lint-action@v7
406+
uses: golangci/golangci-lint-action@v8
408407
with:
409408
# In some rare cases,
410409
# you could have to use `${{ github.workspace }}` as base directory to reference your configuration file.
@@ -432,7 +431,7 @@ The default value is `false`.
432431
<summary>Example</summary>
433432

434433
```yml
435-
uses: golangci/golangci-lint-action@v7
434+
uses: golangci/golangci-lint-action@v8
436435
with:
437436
problem-matchers: true
438437
# ...
@@ -453,7 +452,7 @@ The default value is `false`.
453452
<summary>Example</summary>
454453

455454
```yml
456-
uses: golangci/golangci-lint-action@v7
455+
uses: golangci/golangci-lint-action@v8
457456
with:
458457
skip-cache: true
459458
# ...
@@ -473,7 +472,7 @@ The default value is `false`.
473472
<summary>Example</summary>
474473

475474
```yml
476-
uses: golangci/golangci-lint-action@v7
475+
uses: golangci/golangci-lint-action@v8
477476
with:
478477
skip-save-cache: true
479478
# ...
@@ -495,7 +494,7 @@ If the number is `<= 0`, the cache will always be invalidated (Not recommended).
495494
<summary>Example</summary>
496495

497496
```yml
498-
uses: golangci/golangci-lint-action@v7
497+
uses: golangci/golangci-lint-action@v8
499498
with:
500499
cache-invalidation-interval: 15
501500
# ...

dist/post_run/index.js

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

dist/run/index.js

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy