Skip to content

Commit

Permalink
DXE-4233 Update Makefile to use previous version of goimports
Browse files Browse the repository at this point in the history
  • Loading branch information
mgwoj authored Oct 3, 2024
1 parent 4983724 commit 5310b58
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ M = $(shell echo ">")
clean-tools:
@rm -rf $(BIN)/go*

# Until v0.25.0 is not fixed, we have to use previous version. To install it, we must enable module aware mode.
GOIMPORTS = $(BIN)/goimports
GOIMPORTS_VERSION = v0.24.0
# Rule to install goimports with version pinning
$(GOIMPORTS): | $(BIN) ; $(info $(M) Installing goimports $(GOIMPORTS_VERSION)...)
$Q env GO111MODULE=on GOBIN=$(BIN) $(GO) install golang.org/x/tools/cmd/goimports@$(GOIMPORTS_VERSION)

$(BIN):
@mkdir -p $@
$(BIN)/%: | $(BIN) ; $(info $(M) Building $(PACKAGE)...)
Expand All @@ -34,9 +41,6 @@ $(BIN)/gocov-xml: PACKAGE=github.com/AlekSi/gocov-xml
GOJUNITREPORT = $(BIN)/go-junit-report
$(BIN)/go-junit-report: PACKAGE=github.com/jstemmer/go-junit-report

GOIMPORTS = $(BIN)/goimports
$(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports

GOLANGCILINT = $(BIN)/golangci-lint
$(BIN)/golangci-lint: ; $(info $(M) Installing golangci-lint...) @
$Q curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(BIN) $(GOLANGCI_LINT_VERSION)
Expand Down

0 comments on commit 5310b58

Please sign in to comment.