xxpxxxxp / intellij-plugin-golangci-lint

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

Add environment variables config #136

Closed Kennnnnnji closed 1 year ago

Kennnnnnji commented 1 year ago

For example, sometimes it needs GOARCH=amd64 to build a project on a M1 Macbook.

If this tool can configure that, it can work in such case.

Kennnnnnji commented 1 year ago

the ultimate cmd can be like : GOARCH=amd64 golangci-lint run $file

xxpxxxxp commented 1 year ago

Hi @Kennnnnnji , if I understand correctly, you are trying to cross build from M1 to amd64 target. The plugin takes OS/Arch settings from Go config, you can set the arch to amd64 in Build Tags & Vendoring section of Go config, then the linter will run target amd64 too.

image

Kennnnnnji commented 1 year ago

@xxpxxxxp Awesome, thanks!