Skip to content

Commit 6bb6098

Browse files
authored
Enable license addition as part of fmt target (#640)
1 parent ee1f8f9 commit 6bb6098

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.nwa-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ nwa:
66
- cmd/**/*.go
77
- pkg/**/*.go
88
- test/**/*.go
9+
mute: true

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,13 @@ tt:
8686
$(CONTROLLER_GEN) object paths="./pkg/controller/resourcegraphdefinition"
8787

8888
.PHONY: fmt
89-
fmt: ## Run go fmt against code.
89+
fmt: go-generate ## Run go fmt against code and add licenses.
9090
go fmt ./...
9191

92+
.PHONY: go-generate
93+
go-generate: ## Run go generate against code.
94+
go generate
95+
9296
.PHONY: vet
9397
vet: ## Run go vet against code.
9498
go vet ./...
@@ -221,7 +225,6 @@ envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
221225
$(ENVTEST): $(LOCALBIN)
222226
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) $(GOPREFIX) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
223227

224-
225228
.PHONY: image
226229
build-image: ko ## Build the kro controller images using ko build
227230
echo "Building kro image $(RELEASE_VERSION).."

codegen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
package kro
44

55
//go:generate go tool attribution-gen
6-
//go:generate go tool nwa config -c update
6+
//go:generate go tool nwa config -c add

0 commit comments

Comments
 (0)