Skip to content

depguard is enabled and fails on v1.53.0 #3862

@adamdecaf

Description

@adamdecaf

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

Running v1.53.0 of golangci-lint seems to enable depguard and fails due to a config error.

Version of golangci-lint

$ golangci-lint --version

v1.53.0

Configuration file

Go environment

$ go version && go env

go version go1.20.4 darwin/amd64

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v

golangci/golangci-lint info checking GitHub for tag 'v1.53.0'
golangci/golangci-lint info found version: 1.53.0 for v1.53.0/darwin/amd64
golangci/golangci-lint info installed ./bin/golangci-lint
STARTING golangci-lint checks
ERRO [linter] depguard: create analyzer: couldn't expand $gostd: could not read GOROOT directory: open src: no such file or directory
must have an Allow and/or Deny package list 

Code example or link to a public repository

Updating golangci-lint to v1.53.0 in https://github.com/moov-io/infra/blob/master/go/lint-project.sh

CI run: https://github.com/moov-io/infra/actions/runs/5149020788/jobs/9271486191

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdependenciesRelates to an upstream dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions