Skip to content

Commit 33b0464

Browse files
chore: improve fmt scripts (#179)
1 parent e521bc6 commit 33b0464

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ jobs:
6666
go-version: "~1.21"
6767

6868
- name: Check format
69-
run: bash ./scripts/check_fmt.sh
69+
run: ./scripts/check_fmt.sh

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GOARCH := $(shell go env GOARCH)
22
PWD=$(shell pwd)
33

4-
fmt: **/*.go
4+
fmt: $(shell find . -type f -name '*.go')
55
go run mvdan.cc/[email protected] -l -w .
66

77
develop:

scripts/check_fmt.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
list="$(go run mvdan.cc/[email protected] -l .)"
44
if [[ -n $list ]]; then
5-
echo -e "error: The following files have changes:\n\n${list}\n\nDiff:\n\n"
5+
echo -n -e "error: The following files have changes:\n\n${list}\n\nDiff:\n\n"
66
go run mvdan.cc/[email protected] -d .
77
exit 1
88
fi

0 commit comments

Comments
 (0)