Closed SchoolGuy closed 2 months ago
Disabling the cache didn't yield different results.
It appears that the linter is searching upwards from the project repository and inside source code that is not belonging to the repository. I am not able to reproduce this locally with the golangci-lint
binary.
I modified the CI code in the PR and linting the repository manually yields the same results as locally. It appears this is some kind of configuration error in the GH actions code.
hello,
You are using golangci-lint v1.59 to lint go1.23 code, this is not possible.
You should use golangci-lint v1.60 or upper (compiled with go 1.23) to lint go1.23 code.
lint_go:
name: Linting Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
# https://github.com/golangci/golangci-lint-action
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
@ldez Thank you for that explanation. I would appreciate if it would be possible to detect this in the future and print an error message instead of displaying unrelated error messages.
This is already done but inside v1.60 :wink:
Welcome
Description of the problem
Locally when I run
golangci-lint run
I receive no errors but when the GH Action is running it shows several errors from outside of my code.Version of golangci-lint
1.59
Version of the GitHub Action
6
Workflow file
Golangci-lint configuration
Go version
stable
Code example or link to a public repository