Skip to content

Commit

Permalink
fix lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Jul 2, 2024
1 parent 0d9113d commit e7bcb03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
paths:
- '**/*.go'
- '**/*.mod'
paths-ignore:
- '**/*' # 忽略其他所有文件
jobs:
test-unit:
name: Test Units
Expand Down
17 changes: 0 additions & 17 deletions scripts/go-lint-all.bash
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,4 @@ else
echo "no files to lint"
exit 0
fi

GIT_DIFF=$(echo $GIT_DIFF | tr -d "'" | tr ' ' '\n' | grep '\.go$' | grep -v '\.pb\.go$' | grep -Eo '^[^/]+\/[^/]+' | uniq)

lint_sdk=false
for dir in ${GIT_DIFF[@]}; do
if [[ ! -f "$REPO_ROOT/$dir/go.mod" ]]; then
lint_sdk=true
else
lint_module $dir "$@"
fi
done

if [[ $lint_sdk ]]; then
cd "$REPO_ROOT"
echo "linting github.com/cosmos/cosmos-sdk [$(date -Iseconds -u)]"
golangci-lint run ./... -c "${REPO_ROOT}/.golangci.yml" "$@" --build-tags=${LINT_TAGS}
fi
fi
1 change: 0 additions & 1 deletion simapp/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ type DepinjectOptions struct {
Providers []interface{}
Consumers []interface{}
}

0 comments on commit e7bcb03

Please sign in to comment.