Skip to content

Commit 056aeea

Browse files
committed
Install golangci-lint from binary
1 parent 47895af commit 056aeea

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Makefile.Common

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,19 @@ fmt: $(GOFUMPT) $(GOIMPORTS)
211211
$(GOIMPORTS) -w -local github.com/open-telemetry/opentelemetry-collector-contrib ./
212212

213213
.PHONY: lint
214-
lint: $(LINT) checklicense misspell
214+
lint: $(LINT) checklicense misspell
215215
$(LINT) run
216216

217+
# === CWA Fork from OTel upstream ===
218+
# Download golangci-lint binary instead of building from source to workaround missing repository: https://github.com/golangci/golangci-lint/issues/6017
219+
# The tdakkota/asciicheck user account and repo disappeared so building golangci-lint from source will fail as the repo cannot be pulled
220+
# golangci-lint has a fix for this issue by forking the repo: https://github.com/golangci/golangci-lint/pull/6018
221+
# Once they release a fix and OTel upstream pulls it in, we can undo this
222+
$(TOOLS_BIN_DIR)/golangci-lint: $(TOOLS_BIN_DIR)
223+
echo "Downloading golangci-lint..."
224+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(TOOLS_BIN_DIR) v2.1.1
225+
# === CWA Fork from OTel upstream ===
226+
217227
.PHONY: govulncheck
218228
govulncheck: $(GOVULNCHECK)
219229
$(GOVULNCHECK) ./...

internal/tools/tools.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
_ "github.com/Khan/genqlient"
1515
_ "github.com/client9/misspell/cmd/misspell"
1616
_ "github.com/daixiang0/gci"
17-
_ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
1817
_ "github.com/google/addlicense"
1918
_ "github.com/jcchavezs/porto/cmd/porto"
2019
_ "github.com/jstemmer/go-junit-report"

0 commit comments

Comments
 (0)