Skip to content

Commit

Permalink
Use gofumpt in the make format rule (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanslade authored Dec 17, 2024
1 parent 52d3c95 commit 0d88089
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Install gofumpt tool
run: |
go install mvdan.cc/gofumpt@latest
- name: Generate types
run: |
chmod 666 pkg/state/init.sql
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ format:
docker run --rm -v $$PWD/schema.json:/mnt/schema.json node:alpine npx prettier /mnt/schema.json --parser json --tab-width 2 --single-quote --trailing-comma all --no-semi --arrow-parens always --print-width 120 --write
# Format embedded SQL
docker run --rm -v $$PWD/pkg/state/init.sql:/data/init.sql backplane/pgformatter --inplace /data/init.sql
gofumpt -w .

generate: format
# Generate the types from the JSON schema
Expand Down

0 comments on commit 0d88089

Please sign in to comment.