mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Make sure shellcheck exist
Signed-off-by: guiyong.ou <guiyong.ou@daocloud.io>
This commit is contained in:
parent
40cc73c22e
commit
4f238837aa
1
Makefile
1
Makefile
@ -141,4 +141,5 @@ clean:
|
|||||||
rm -rf ./release
|
rm -rf ./release
|
||||||
rm -rf ./coverage/*.err ./coverage/*.out
|
rm -rf ./coverage/*.err ./coverage/*.out
|
||||||
rm -rf ./tests/e2e/default.proxy
|
rm -rf ./tests/e2e/default.proxy
|
||||||
|
rm -rf ./bin/shellcheck*
|
||||||
find ./ -name "127.0.0.1:*" -o -name "localhost:*" -o -name "*.log" -o -name "agent-*" -o -name "*.coverprofile" -o -name "testname-proxy-*" -delete
|
find ./ -name "127.0.0.1:*" -o -name "localhost:*" -o -name "*.log" -o -name "agent-*" -o -name "*.coverprofile" -o -name "testname-proxy-*" -delete
|
||||||
|
@ -53,6 +53,7 @@ fi
|
|||||||
|
|
||||||
PASSES=${PASSES:-"fmt bom dep build unit"}
|
PASSES=${PASSES:-"fmt bom dep build unit"}
|
||||||
PKG=${PKG:-}
|
PKG=${PKG:-}
|
||||||
|
SHELLCHECK_VERSION=${SHELLCHECK_VERSION:-"v0.8.0"}
|
||||||
|
|
||||||
if [ -z "$GOARCH" ]; then
|
if [ -z "$GOARCH" ]; then
|
||||||
GOARCH=$(go env GOARCH);
|
GOARCH=$(go env GOARCH);
|
||||||
@ -388,9 +389,15 @@ function cov_pass {
|
|||||||
######### Code formatting checkers #############################################
|
######### Code formatting checkers #############################################
|
||||||
|
|
||||||
function shellcheck_pass {
|
function shellcheck_pass {
|
||||||
if tool_exists "shellcheck" "https://github.com/koalaman/shellcheck#installing"; then
|
SHELLCHECK=shellcheck
|
||||||
generic_checker run shellcheck -fgcc scripts/*.sh
|
if ! tool_exists "shellcheck" "https://github.com/koalaman/shellcheck#installing"; then
|
||||||
|
log_callout "Installing shellcheck $SHELLCHECK_VERSION"
|
||||||
|
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJv -C /tmp/ --strip-components=1
|
||||||
|
mkdir -p ./bin
|
||||||
|
mv /tmp/shellcheck ./bin/
|
||||||
|
SHELLCHECK=./bin/shellcheck
|
||||||
fi
|
fi
|
||||||
|
generic_checker run ${SHELLCHECK} -fgcc scripts/*.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
function shellws_pass {
|
function shellws_pass {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user