golangci / golangci-lint-action

Official GitHub Action for golangci-lint from its authors
https://github.com/marketplace/actions/golangci-lint
MIT License
1.1k stars 152 forks source link

Does not work on go 1.23 #1086

Closed mskonovalov closed 3 months ago

mskonovalov commented 3 months ago

Welcome

Description of the problem

Since yesterday our CI step started to fail. With no error messages, simply hanging forever. Looking into logs it seems we now have go 1.23. And the last working commit was using 1.22 Not sure yet what could be the exact issue (will update my findings) but for now it just does not work completely

Version of golangci-lint

1.59.1

Version of the GitHub Action

v6

Workflow file

```yml golangci: runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Checkout the repository uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: stable - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: version: v1.59 ```

Golangci-lint configuration

```yml linters: # use all the default linters, plus the following enable: - goimports ```

Go version

1.23

Code example or link to a public repository

```go // add your code here ```
mskonovalov commented 3 months ago

OK, https://github.com/golangci/golangci-lint/issues/4837 TBH not sure if there is anything that the action can do here. Maybe it is possible to add check if go is 1.23 and lint is < 1.60 to print meaningful error message

mskonovalov commented 3 months ago

Just a tiny update: it seems for 1.60.1 and go 1.23 it also does not work

  golangci:
    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
      - name: Checkout the repository
        uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: '1.23.0'
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v6
        with:
          version: v1.60.1

I guess it is becuase of https://github.com/golangci/golangci-lint/issues/4908#issuecomment-2288716658

ldez commented 3 months ago

It's not related: in the issue, I talk about a custom build of golangci-lint with go1.22. You are using the official version built with go1.23.

You can add extra information if you have a reproducible context, logs, etc.