We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bfb0bd commit dcd1234Copy full SHA for dcd1234
1 file changed
scripts/lint.sh
@@ -42,11 +42,13 @@ format(){
42
exit 1
43
fi
44
45
- GOFMT_OUTPUT="$(find "./sdk" "./node" "./wormchain" \
46
- \( -name node_modules -prune \) -o \
47
- \( -name .gocache -prune \) -o \
48
- \( -name target -prune \) -o \
49
- -type f -name '*.go' -not -path '*.pb.go' -print0 | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)"
+
+ GOFMT_OUTPUT="$(git -C "$ROOT" ls-files -z --cached -- \
+ 'sdk/**/*.go' \
+ 'node/**/*.go' \
+ 'wormchain/**/*.go' \
50
+ ':(exclude)**/*.pb.go' \
51
+ | xargs -r -0 goimports $GOIMPORTS_ARGS 2>&1)"
52
53
if [ -n "$GOFMT_OUTPUT" ]; then
54
if [ "$GITHUB_ACTION" == "true" ]; then
0 commit comments