Skip to content

Commit

Permalink
fix checkfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mariomac committed Oct 14, 2024
1 parent f141db5 commit ce02bed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ KIND = $(TOOLS_DIR)/kind
DASHBOARD_LINTER = $(TOOLS_DIR)/dashboard-linter
GINKGO = $(TOOLS_DIR)/ginkgo

GOIMPORTS_REVISER_ARGS = -company-prefixes github.com/grafana -project-name github.com/grafana/beyla/

define check_format
$(shell $(foreach FILE, $(shell find . -name "*.go" -not -path "**/vendor/*"), \
$(GOIMPORTS_REVISER) -company-prefixes github.com/grafana -list-diff -output stdout $(FILE);))
$(GOIMPORTS_REVISER) $(GOIMPORTS_REVISER_ARGS) -list-diff -output stdout $(FILE);))
endef


Expand Down Expand Up @@ -121,7 +123,7 @@ prereqs: install-hooks
fmt: prereqs
@echo "### Formatting code and fixing imports"
@$(foreach FILE, $(shell find . -name "*.go" -not -path "**/vendor/*"), \
$(GOIMPORTS_REVISER) -company-prefixes github.com/grafana -project-name github.com/grafana/beyla/ $(FILE);)
$(GOIMPORTS_REVISER) $(GOIMPORTS_REVISER_ARGS) $(FILE);)

.PHONY: checkfmt
checkfmt:
Expand Down

0 comments on commit ce02bed

Please sign in to comment.