Skip to content

Commit

Permalink
Inlcuded a faster fmt (#1507)
Browse files Browse the repository at this point in the history
* Inlcuded a faster fmt

* `make fmt` takes an extremely long time so I created `fmt-local`.
* `fmt-local` doesn't break the CI.
* `fmt-local` works by only running on files that are changed.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

* Replaced the previous fmt

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>

---------

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
  • Loading branch information
nathannaveen committed Dec 7, 2023
1 parent 2b1e1ae commit c72e762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -58,9 +58,9 @@ cover: test
.PHONY: fmt
fmt:
@echo "Testing formatting and imports"
test -z "$(shell find . -name '*.go' -not -path './.git/*' -not -wholename './vendor/*' -not -name '*.pb.go' -exec goimports -l -e {} \;)"
test -z "$(shell git diff --name-status $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') -- '*.go' | grep '.go$$' | grep -v '^D' | grep -v '*.pb.go' | grep -v 'vendor/*' | cut -f 2- | xargs -n 1 -P 4 goimports -l -e)"
@echo "Testing copyright notice"
test -z "$(shell find . -name '*.go' -not -path './.git/*' -not -wholename './vendor/*' -not -name '*.pb.go' -exec .github/scripts/copyright.sh {} \;)"
test -z "$(shell git diff --name-status $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') -- '*.go' | grep '.go$$' | grep -v '^D' | grep -v '*.pb.go' | grep -v 'vendor/*' | cut -f 2- | xargs -n 1 -P 4 .github/scripts/copyright.sh)"


# Check that generated files are up to date
Expand Down

0 comments on commit c72e762

Please sign in to comment.