Skip to content

Commit

Permalink
lint: Force amd64 ARCH for Windows golangci-lint runs
Browse files Browse the repository at this point in the history
Trying to run `make cross-lint` on a M1 mac results in:
% GOOS=windows /Users/teuf/dev/crc/tools/bin/golangci-lint run

WARN [runner] Can't run linter goanalysis_metalinter: buildir: failed to load package w32uiautomation: could not load export data: no export data for "github.com/openstandia/w32uiautomation"
ERRO Running error: 1 error occurred:
	* can't run linter goanalysis_metalinter: buildir: failed to load package w32uiautomation: could not load export data: no export data for "github.com/openstandia/w32uiautomation"

Not exactly clear what's happening, but Windows on arm64 is not a
thing, and forcing GOARCH to amd64 avoids this issue, so this commit
does that.
  • Loading branch information
cfergeau authored and anjannath committed Jul 25, 2022
1 parent 316979d commit da10d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ lint: golangci-lint
cross-lint: golangci-lint
GOOS=darwin $(TOOLS_BINDIR)/golangci-lint run
GOOS=linux $(TOOLS_BINDIR)/golangci-lint run
GOOS=windows $(TOOLS_BINDIR)/golangci-lint run
GOARCH=amd64 GOOS=windows $(TOOLS_BINDIR)/golangci-lint run

.PHONY: gen_release_info
gen_release_info:
Expand Down

0 comments on commit da10d2b

Please sign in to comment.