Skip to content

feat: use absolute paths by default when using working-directory option #1231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
version:
- ""
- "latest"
- "v2.0"
- "v2.0.0"
- "v2.1"
- "v2.1.0"
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand Down Expand Up @@ -83,8 +83,8 @@ jobs:
version:
- ""
- "latest"
- "v2.0.0"
- "1f032fbc4b117e4247b19ff606cc847ab5383bc9"
- "v2.1.0"
- "f6c2e6c999dfae444d1fe7f1b0d49becdae44547"
runs-on: ${{ matrix.os }}
permissions:
contents: read
Expand Down
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ jobs:
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
version: v2.0
version: v2.1
```
</details>
Expand Down Expand Up @@ -92,9 +92,9 @@ jobs:
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
version: v2.0
version: v2.1
```
You will also likely need to add the following `.gitattributes` file to ensure that line endings for Windows builds are properly formatted:
Expand Down Expand Up @@ -147,11 +147,10 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
- name: golangci-lint ${{ matrix.modules }}
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
working-directory: ${{ matrix.modules }}
args: --path-mode=abs
```

</details>
Expand Down Expand Up @@ -230,11 +229,10 @@ jobs:
with:
go-version: ${{ inputs.go-version }}
- name: golangci-lint ${{ matrix.modules }}
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
version: ${{ inputs.golangci-lint-version }}
working-directory: ${{ matrix.modules }}
args: --path-mode=abs
```

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

## Compatibility

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

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
version: v2.0
version: v2.1
# ...
```

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

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
install-mode: "goinstall"
# ...
Expand All @@ -313,7 +312,7 @@ By default, it uses the `github.token` from the action.
<summary>Example</summary>

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

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
verify: false
# ...
Expand All @@ -361,7 +360,7 @@ The default value is `false`.
<summary>Example</summary>

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
only-new-issues: true
# ...
Expand All @@ -379,7 +378,7 @@ Working directory, useful for monorepos.
<summary>Example</summary>

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
working-directory: somedir
# ...
Expand All @@ -404,7 +403,7 @@ golangci-lint command line arguments.
<summary>Example</summary>

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

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
problem-matchers: true
# ...
Expand All @@ -453,7 +452,7 @@ The default value is `false`.
<summary>Example</summary>

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
skip-cache: true
# ...
Expand All @@ -473,7 +472,7 @@ The default value is `false`.
<summary>Example</summary>

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

```yml
uses: golangci/golangci-lint-action@v7
uses: golangci/golangci-lint-action@v8
with:
cache-invalidation-interval: 15
# ...
Expand Down
10 changes: 5 additions & 5 deletions dist/post_run/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions dist/run/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading