Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .bingo/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions .bingo/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions .bingo/Variables.mk

This file was deleted.

1 change: 0 additions & 1 deletion .bingo/go.mod

This file was deleted.

5 changes: 0 additions & 5 deletions .bingo/golangci-lint.mod

This file was deleted.

945 changes: 0 additions & 945 deletions .bingo/golangci-lint.sum

This file was deleted.

5 changes: 0 additions & 5 deletions .bingo/oapi-codegen.mod

This file was deleted.

147 changes: 0 additions & 147 deletions .bingo/oapi-codegen.sum

This file was deleted.

14 changes: 0 additions & 14 deletions .bingo/variables.env

This file was deleted.

22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
include .bingo/Variables.mk
# golangci-lint version — installed as a dedicated binary (not via go.mod)
# to avoid its massive dependency tree contaminating project dependencies.
# See: https://golangci-lint.run/docs/welcome/install/local/
GOLANGCI_LINT_VERSION ?= v2.7.0
GOLANGCI_LINT = ./bin/golangci-lint-$(GOLANGCI_LINT_VERSION)

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -44,13 +48,13 @@ help: ## Display this help
##@ Code Generation

.PHONY: generate
generate: $(OAPI_CODEGEN) ## Generate API client code from OpenAPI schema
generate: ## Generate API client code from OpenAPI schema
$(GO) mod download
rm -rf pkg/api/openapi
mkdir -p pkg/api/openapi openapi
@rm -f openapi/openapi.yaml
@cp "$$($(GO) list -m -f '{{.Dir}}' github.com/openshift-hyperfleet/hyperfleet-api-spec)/schemas/core/openapi.yaml" openapi/openapi.yaml
$(OAPI_CODEGEN) --config openapi/oapi-codegen.yaml openapi/openapi.yaml
$(GO) tool oapi-codegen --config openapi/oapi-codegen.yaml openapi/openapi.yaml
@echo "✓ API client code generated in pkg/api/openapi/"

##@ Development
Expand Down Expand Up @@ -128,8 +132,8 @@ vet: generate ## Run go vet
$(GO) vet ./...

.PHONY: lint
lint: generate $(GOLANGCI_LINT) ## Run golangci-lint
$(GOLANGCI_LINT) run
lint: $(GOLANGCI_LINT) ## Run golangci-lint
$(GOLANGCI_LINT) run ./...

.PHONY: verify
verify: generate fmt-check vet ## Run all verification checks
Expand Down Expand Up @@ -173,3 +177,11 @@ endif
$(CONTAINER_TOOL) push quay.io/$(QUAY_USER)/$(IMAGE_NAME):$(DEV_TAG)
@echo ""
@echo "Dev image pushed: quay.io/$(QUAY_USER)/$(IMAGE_NAME):$(DEV_TAG)"

$(GOLANGCI_LINT):
GOBIN=$(CURDIR)/bin go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
@mv ./bin/golangci-lint $@

.PHONY: tools
tools: ## Install pinned tool versions from go.mod tool directives
$(GO) install tool
Loading