diff --git a/Makefile b/Makefile index e546d99..a343aad 100644 --- a/Makefile +++ b/Makefile @@ -130,12 +130,15 @@ all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST) releases: $(gz_releases) $(zip_releases) -lint: - GOOS=darwin golangci-lint run ./... - GOOS=windows golangci-lint run ./... - GOOS=linux golangci-lint run ./... - GOOS=freebsd golangci-lint run ./... - GOOS=openbsd golangci-lint run ./... +LINT_OS_LIST := darwin windows linux freebsd openbsd + +lint: $(foreach os,$(LINT_OS_LIST),$(os)-lint) +%-lint: + GOOS=$* golangci-lint run ./... + +lint-fix: $(foreach os,$(LINT_OS_LIST),$(os)-lint-fix) +%-lint-fix: + GOOS=$* golangci-lint run --fix ./... clean: rm $(BINDIR)/*