Skip to content

Commit a2f8749

Browse files
authored
Unify golangci-lint: replace Docker-based lint with go run pattern (#1046)
* Unify golangci-lint: replace Docker-based lint with go run pattern Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech> * Address review comments Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech> --------- Signed-off-by: Aravindhan Ayyanathan <aravindhan.a@est.tech>
1 parent fdfc139 commit a2f8749

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.golangci.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
{
4242
"linters": ["staticcheck"],
4343
"text": "SA1019.*client\\.Apply"
44+
},
45+
{
46+
"linters": ["govet"],
47+
"text": "inline: cannot inline"
4448
}
4549
]
4650
},

make/go.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Core Go development tools
1616

17-
GOLANG_CI_VER ?= 2.12.2
17+
GOLANGCI_LINT_VERSION ?= 2.12.2
1818
GOLANG_CI_ARGS ?= -v --fix --timeout=10m
1919

2020
##@ Go Development
@@ -33,10 +33,10 @@ fix: fix-api ## Run go fix against the codebase
3333

3434
.PHONY: lint
3535
lint: lint-api ## Run Go linter against the codebase
36-
@if command -v golangci-lint >/dev/null 2>&1 && [ "$$(golangci-lint version --short)" = "$(GOLANG_CI_VER)" ]; then \
36+
@if command -v golangci-lint >/dev/null 2>&1 && [ "$$(golangci-lint version --short)" = "$(GOLANGCI_LINT_VERSION)" ]; then \
3737
golangci-lint run ./... $(GOLANG_CI_ARGS); \
3838
else \
39-
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v$(GOLANG_CI_VER) run ./... $(GOLANG_CI_ARGS); \
39+
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v$(GOLANGCI_LINT_VERSION) run ./... $(GOLANG_CI_ARGS); \
4040
fi
4141

4242
.PHONY: fix-all

pkg/registry/porch/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,4 +358,4 @@ func (w *watcher) OnPackageRevisionChange(eventType watch.EventType, pr reposito
358358
// WatchList semantics require bookmarks to signal initial-events-end.
359359
func effectiveAllowWatchBookmarks(allowWatchBookmarks, sendInitialEvents bool) bool {
360360
return allowWatchBookmarks || sendInitialEvents
361-
}
361+
}

0 commit comments

Comments
 (0)