...
1fmt: modtidy gofmt goimports prettier
2ifdef CI
3 if [[ $$(git ls-files --other --modified --exclude-standard) != "" ]]; then
4 echo "Files need generation or are formatted incorrectly:"
5 git -c color.ui=always status | grep --color=no '\e\[31m'
6 echo "Please run the following locally:"
7 echo " make fmt"
8 exit 1
9 fi
10endif
11
12modtidy: gen
13 go mod tidy
14
15gofmt: gen
16 gofmt -w -s .
17
18goimports: gen
19 goimports -w "-local=$$(go list -m)" .
20
21prettier:
22 prettier --write --print-width=120 --no-semi --trailing-comma=all --loglevel=warn $$(git ls-files "*.yml")
23
24gen:
25 go generate ./...
View as plain text