Skip to content

Commit

Permalink
add golines to make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed May 19, 2024
1 parent 747fdfc commit 7da17a2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ mocks:
@bash ./scripts/mocks-generate.sh
.PHONY: mocks

generate: proto-gen openapi specs typescript docs-zetacored mocks
fmt-golines:
@echo "--> Formatting Go lines"
@bash ./scripts/fmt-golines.sh

generate: proto-gen openapi specs typescript docs-zetacored mocks fmt-golines
.PHONY: generate

###############################################################################
Expand Down
10 changes: 10 additions & 0 deletions scripts/fmt-golines.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# Install golines
go install github.com/segmentio/[email protected]

# Run golines in Cosmos modules and ZetaClient codebase
find ./x ./zetaclient -type f -name '*.go' -exec golines -w --max-len=120 {} + > /dev/null 2>&1

# Print a message to indicate completion
echo "Go source code lines formatted."

0 comments on commit 7da17a2

Please sign in to comment.