Skip to content

Commit

Permalink
fix: make format now runs gofumpt (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Lewis <[email protected]>
  • Loading branch information
ianlewis authored Feb 5, 2025
1 parent 379e06e commit ab2b9ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pre-submit.units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ jobs:
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: "package.json"
- run: |
make format
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: "go.mod"
- run: go install mvdan.cc/[email protected]
- run: go install github.com/daixiang0/[email protected]
- run: make format
- name: check diff
run: |
set -euo pipefail
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ license-headers: ## Update license headers.
fi;

.PHONY: format
format: md-format yaml-format ## Format all files
format: go-format md-format yaml-format ## Format all files

.PHONY: md-format
md-format: node_modules/.installed ## Format Markdown files.
Expand Down Expand Up @@ -147,7 +147,7 @@ go-format: ## Format Go files (gofumpt).
@set -euo pipefail;\
files=$$(git ls-files '*.go'); \
if [ "$${files}" != "" ]; then \
gofumpt $${files}; \
gofumpt -w $${files}; \
gci write --skip-generated -s standard -s default -s "prefix(github.com/ianlewis/go-dictzip)" $${files}; \
fi

Expand Down

0 comments on commit ab2b9ad

Please sign in to comment.