[Error] Can't run linter goanalysis_metalinter: buildir
See original GitHub issueI found error suddenly due to go1.18 issue Then I tried to change configuration followed by the above issue, another error as title happened after configuration changed.
Errors are
run golangci-lint
Running [/home/runner/golangci-lint-1.45.2-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=cmds/alpha] in [/home/runner/work/org/my-repo/cmds/alpha] ...
level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for \"io/fs\""
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: buildir: failed to load package : could not load export data: no export data for \"io/fs\"\n\n"
configuration
golangci:
name: lint
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.17]
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- name: golangci-lint for alpha cmds
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
working-directory: cmds/alpha
difference from most of common use is I’m using monorepo and I use working-directory. I’m not sure .golangcli.yaml stored in root directory is used properly in this version, thought it used to be work.
Issue Analytics
- State:
- Created a year ago
- Comments:8
Top Results From Across the Web
golangci-lint file watcher fails to run (failed to load package ...
I can't reproduce it so far, but I installed golangci-lint via Homebrew instead of curl. Pay attention that installation via curl is applicable...
Read more >make lint errors running golangci-lint during make presubmit
WARN [runner] Can't run linter goanalysis_metalinter: deadcode: analysis ... ERRO Running error: buildir: failed to load package goarch: could not load ...
Read more >GitHub action for golangci-lint fails with can't load fmt
If I run it with go 1.18, it works fine. With go 1.19, it fails with the same error as given here. Share....
Read more >Linters | golangci-lint
Name Description Presets Since
asasalint ⚙️ check for pass any as any in variadic func(...any) bugs 1.47.0
bidichk ⚙️ Checks for dangerous unicode character sequences...
Read more >Replace CodeClimate with golangci-lint (!90) - GitLab
7354c6b6 - Intentional code style error to check golangci-lint in CI ... WARN [runner] Can't run linter unused: buildir: failed to load package...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
getting this issue as well both locally and in ci workflow
my golangci-lint version was 1.50.1 and my go version was: go version go1.18.1 darwin/arm64
not effect