File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 42
42
# Pretty: formats the code using gofumpt and goimports-reviser
43
43
pretty : check-tools
44
44
@echo " Running formatting tools..."
45
- @gofumpt -l - w . > /dev/null 2>&1 || true
46
- @goimports-reviser -project-name $$(go list -m ) -rm-unused -set-alias -format . > /dev/null 2>&1 || true
45
+ @gofumpt -w . > /dev/null 2>&1
46
+ @goimports-reviser -recursive - project-name $$(go list -m ) -rm-unused -set-alias ./go > /dev/null 2>&1
47
47
48
48
# Tools installation command
49
49
install-tools :
Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ for file in $GO_FILES; do
18
18
}
19
19
done
20
20
21
- # 2. Run goimports-reviser to verify formatting on changed files (without writing changes)
22
- echo " Checking goimports-reviser formatting ..."
21
+ # Check imports with goimports-reviser
22
+ echo " Checking goimports-reviser imports ..."
23
23
for file in $GO_FILES ; do
24
- goimports-reviser -project-name $( go list -m) -rm-unused -set-alias -format " $file " -diff > /dev/null 2>&1
24
+ goimports-reviser -project-name $( go list -m) -rm-unused -set-alias " $file " > /dev/null 2>&1
25
25
if [[ $? -ne 0 ]]; then
26
- echo " Error: Imports not correctly formatted in $file . Please run 'make pretty'."
26
+ echo " Error: Imports not correctly organized in $file . Please run 'make pretty'."
27
27
exit 1
28
28
fi
29
29
done
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import (
20
20
"testing"
21
21
22
22
"github.com/stretchr/testify/assert"
23
-
24
23
"github.com/stretchr/testify/require"
25
24
)
26
25
You can’t perform that action at this time.
0 commit comments