Skip to content
Open
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
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ repos:
entry: make
args: ['crd-schema-check']
pass_filenames: false
- id: make-style-check
name: make-style-check
language: system
entry: make
args: ['style-check']
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ vet: gowork ## Run go vet against code.
go vet ./...
go vet ./... ./api/...

.PHONY: style-check
style-check: ## Run go modernize to check latest style conventions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its only a nit but i woudl proably have gone with modernize

as the make target name

mainly be cause i think for go format when i think if style checks but that is jsut me.

+1

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

.PHONY: tidy
tidy: ## Run go mod tidy on every mod file in the repo
go mod tidy
Expand Down