xxpxxxxp / intellij-plugin-golangci-lint

GolangCI-Lint integration for IDEA
GNU General Public License v3.0
219 stars 15 forks source link

Can't run linter goanalysis_metalinter: inspect: failed to load package context: could not load export data: no export data for "context" #124

Closed hurrycaner closed 2 years ago

hurrycaner commented 2 years ago

I'm getting this error all the time, I've tried updating golangci-lint and it didn't changed, golangci-lint is working as expected through cli.

``` WARN - go-linter - Run error: level=warning msg="[runner] Can't run linter goanalysis_metalinter: inspect: failed to load package context: could not load export data: no export data for \"context\"" level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: inspect: failed to load package context: could not load export data: no export data for \"context\"\n\n". Please make sure the project has no syntax error. WARN - go-linter - Debug command: cd /Users/hurrycaner/workspace/solo-service && export PATH=/opt/homebrew/Cellar/go@1.17/1.17.13/libexec/bin:/usr/bin:/bin:/usr/sbin:/sbin && export GOPATH= && export GO111MODULE=on && '/Users/hurrycaner/go/bin/golangci-lint' 'run' '--out-format' 'json' '--allow-parallel-runners' '-j' '4' '--issues-exit-code' '1' '--max-issues-per-linter' '0' '--max-same-issues' '0' '-c' '/Users/hurrycaner/workspace/solo-service/.golangci.yml' '--build-tags' 'linux' 'internal/interfaces' ```

On the error log, i saw that there's that '--build-tags' 'linux' 'internal/interfaces', but i'm running it on a macbook, removing that 'linux', things works as expected... the project has problems at all... am i missing anything?

xxpxxxxp commented 2 years ago

Hi @hurrycaner , the build tag is get from IDE setting, you can check it here:

image

Please check your OS setting.