Skip to content

Commit 8ed489c

Browse files
committed
Makefile: Add a linting target that runs gofmt/goimports
Explicitly ignore operatorclient generated packages The gofmt/goimport commands are touching generated packages that don't have the proper "//go:generate ..." instructions. Signed-off-by: timflannagan <[email protected]>
1 parent 966ce43 commit 8ed489c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ clean:
184184
@rm -rf test/e2e/log
185185
@rm -rf e2e.namespace
186186

187+
lint:
188+
find . -name '*.go' -not -path "./vendor/*" -not -path "./pkg/lib/operatorclient/operatorclientmocks/*" | xargs gofmt -w
189+
find . -name '*.go' -not -path "./vendor/*" -not -path "./pkg/lib/operatorclient/operatorclientmocks/*" | xargs goimports -w
187190

188191
# Copy CRD manifests
189192
manifests: vendor

0 commit comments

Comments
 (0)