@@ -198,6 +198,12 @@ EXCLUDE_DIRS := vendor .gobuild deps tools pkg/generated/clientset pkg/generated
198
198
EXCLUDE_FILES := *generated.deepcopy.go
199
199
SOURCES_QUERY := find ./ -type f -name '*.go' ! -name '*.pb.go' $(foreach EXCLUDE_DIR,$(EXCLUDE_DIRS ) , ! -path "* /$(EXCLUDE_DIR ) /* ") $(foreach EXCLUDE_FILE,$(EXCLUDE_FILES ) , ! -path "* /$(EXCLUDE_FILE ) ")
200
200
SOURCES := $(shell $(SOURCES_QUERY ) )
201
+
202
+ YAML_EXCLUDE_DIRS := vendor .gobuild deps tools pkg/generated/clientset pkg/generated/informers pkg/generated/listers chart/kube-arangodb/templates chart/kube-arangodb-crd/templates chart/arangodb-ingress-proxy/templates
203
+ YAML_EXCLUDE_FILES :=
204
+ YAML_QUERY := find ./ -type f -name '*.yaml' $(foreach EXCLUDE_DIR,$(YAML_EXCLUDE_DIRS ) , ! -path "* /$(EXCLUDE_DIR ) /* ") $(foreach EXCLUDE_FILE,$(YAML_EXCLUDE_FILES ) , ! -path "* /$(EXCLUDE_FILE ) ")
205
+ YAMLS := $(shell $(YAML_QUERY ) )
206
+
201
207
DASHBOARDSOURCES := $(shell find $(DASHBOARDDIR ) /src -name '* .js') $(DASHBOARDDIR ) /package.json
202
208
LINT_EXCLUDES: =
203
209
ifeq ($(RELEASE_MODE ) ,enterprise)
@@ -242,6 +248,12 @@ fmt:
242
248
@$(GOPATH ) /bin/goimports -w $(SOURCES )
243
249
@$(GOPATH ) /bin/gci write -s " standard" -s " default" -s " prefix(github.com/arangodb)" -s " prefix(github.com/arangodb/kube-arangodb)" $(SOURCES )
244
250
251
+ .PHONY : yamlfmt
252
+ yamlfmt :
253
+ @echo " >> Ensuring style of yaml files"
254
+ @$(GOPATH ) /bin/yamlfmt -w $(YAMLS )
255
+ @$(GOPATH ) /bin/yamlfmt -w $(YAMLS )
256
+
245
257
.PHONY : license
246
258
license :
247
259
@echo " >> Ensuring license of files"
@@ -507,6 +519,8 @@ tools-min: update-vendor
507
519
@GOBIN=$(GOPATH ) /bin go install golang.org/x/tools/cmd/goimports@0bb7e5c47b1a31f85d4f173edc878a8e049764a5
508
520
@echo " >> Fetching license check"
509
521
@GOBIN=$(GOPATH ) /bin go install github.com/google/addlicense@6d92264d717064f28b32464f0f9693a5b4ef0239
522
+ @echo " >> Fetching yamlfmt"
523
+ @GOBIN=
$(GOPATH ) /bin go install github.com/UltiRequiem/
[email protected]
510
524
511
525
.PHONY : tools
512
526
tools : tools-min
@@ -599,7 +613,7 @@ check-community:
599
613
@$(MAKE ) _check RELEASE_MODE=community
600
614
601
615
_check :
602
- @$(MAKE ) fmt license-verify linter run-unit-tests bin
616
+ @$(MAKE ) fmt yamlfmt license-verify linter run-unit-tests bin
603
617
604
618
generate : generate-internal generate-proto fmt
605
619
@@ -613,4 +627,4 @@ generate-proto:
613
627
$(PROTOSOURCES )
614
628
615
629
.PHONY : fix
616
- fix : license-range fmt license
630
+ fix : license-range fmt license yamlfmt
0 commit comments