Skip to content
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

Issue running golangci-lint 1.53 via the action #760

Closed
3 tasks done
iuliananz opened this issue Jun 2, 2023 · 1 comment
Closed
3 tasks done

Issue running golangci-lint 1.53 via the action #760

iuliananz opened this issue Jun 2, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists upstream related the golangci-lint but not to the action

Comments

@iuliananz
Copy link

Welcome

  • Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc).

Description of the problem

We've started seeing this in our CI with the move to 1.53. No issues with 1.52.2. I tried with the default configuration or custom one, no difference.
On the local machine, it works fine with 1.53, it only fails in CI, thus I'm assuming there's something not working with how the action is setup

  Running [/root/golangci-lint-1.53.0-linux-amd64/golangci-lint run --out-format=github-actions --verbose --timeout 10m0s] in [] ...
  level=error msg="[linter] depguard: create analyzer: couldn't expand $gostd: could not read GOROOT directory: open src: no such file or directory\nmust have an Allow and/or Deny package list"
  
  Error: golangci-lint exit with code 3
  Ran golangci-lint in 83ms

Any idea how to fix it?

Version of golangci-lint

1.53

Version of the GitHub Action

3.4

Workflow file

GO_VERSION: I've tried with both 1.19.9 and 1.20.4

 lint-go-files:
    name: lint-go-files
    runs-on: [ self-hosted, prod ]
    steps:
      - name: "Checkout"
        uses: actions/checkout@v3
      - name: "Setup Golang"
        uses: actions/setup-go@v4
        with:
          go-version: ${{ env.GO_VERSION }}
      - name: "Run lint"
        uses: golangci/golangci-lint-action@v3
        with:
          skip-pkg-cache: true
          skip-build-cache: true
          args: --verbose --timeout 10m0s

Go version

1.20.4

Code example or link to a public repository

Not relevant, it'll fail any code, it has nothing to do with the actual code being linted.
@ldez
Copy link
Member

ldez commented Jun 2, 2023

Duplicate of golangci/golangci-lint#3862

Fixed by golangci/golangci-lint#3866

Duplicate of #761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists upstream related the golangci-lint but not to the action
Projects
None yet
Development

No branches or pull requests

2 participants