mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #8558 from aarlt/ci_add_shellcheck
[ci] add chk_shellscripts
This commit is contained in:
commit
aa3f74c61b
@ -287,9 +287,15 @@ jobs:
|
||||
- image: buildpack-deps:disco
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install shellcheck
|
||||
command: apt -q update && apt install -y shellcheck
|
||||
- run:
|
||||
name: Check for C++ coding style
|
||||
command: ./scripts/check_style.sh
|
||||
- run:
|
||||
name: checking shell scripts
|
||||
command: ./scripts/chk_shellscripts/chk_shellscripts.sh
|
||||
|
||||
chk_pylint:
|
||||
docker:
|
||||
|
27
scripts/chk_shellscripts/chk_shellscripts.sh
Executable file
27
scripts/chk_shellscripts/chk_shellscripts.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
REPO_ROOT="$(dirname "$0")"/../..
|
||||
REPO_ROOT=$(realpath "${REPO_ROOT}")
|
||||
IGNORE_FILENAME="ignore.txt"
|
||||
IGNORE_FILE="${REPO_ROOT}/scripts/chk_shellscripts/${IGNORE_FILENAME}"
|
||||
|
||||
FOUND_FILES_TMP=$(mktemp)
|
||||
IGNORE_FILES_TMP=$(mktemp)
|
||||
trap 'rm -f ${FOUND_FILES_TMP} ; rm -f ${IGNORE_FILES_TMP}' EXIT
|
||||
|
||||
sort < "${IGNORE_FILE}" >"${IGNORE_FILES_TMP}"
|
||||
cd "${REPO_ROOT}"
|
||||
find . -type f -name "*.sh" | sort >"${FOUND_FILES_TMP}"
|
||||
|
||||
SHELLCHECK=${SHELLCHECK:-"$(command -v -- shellcheck)"}
|
||||
if [ ! -f "${SHELLCHECK}" ]; then
|
||||
echo "error: shellcheck '${SHELLCHECK}' not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FILES=$(join -v2 "${IGNORE_FILES_TMP}" "${FOUND_FILES_TMP}")
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
"${SHELLCHECK}" ${FILES[*]}
|
50
scripts/chk_shellscripts/ignore.txt
Normal file
50
scripts/chk_shellscripts/ignore.txt
Normal file
@ -0,0 +1,50 @@
|
||||
./test/docsCodeStyle.sh
|
||||
./test/cmdlineTests.sh
|
||||
./test/externalTests.sh
|
||||
./test/externalTests/common.sh
|
||||
./test/externalTests/gnosis.sh
|
||||
./test/externalTests/zeppelin.sh
|
||||
./test/externalTests/colony.sh
|
||||
./test/externalTests/solc-js/solc-js.sh
|
||||
./scripts/common.sh
|
||||
./scripts/isoltest.sh
|
||||
./scripts/get_version.sh
|
||||
./scripts/soltest.sh
|
||||
./scripts/test_emscripten.sh
|
||||
./scripts/wasm-rebuild/docker-scripts/rebuild_tags.sh
|
||||
./scripts/wasm-rebuild/docker-scripts/rebuild_current.sh
|
||||
./scripts/wasm-rebuild/docker-scripts/genbytecode.sh
|
||||
./scripts/wasm-rebuild/docker-scripts/patch.sh
|
||||
./scripts/wasm-rebuild/rebuild.sh
|
||||
./scripts/build_emscripten.sh
|
||||
./scripts/travis-emscripten/build_emscripten.sh
|
||||
./scripts/travis-emscripten/install_deps.sh
|
||||
./scripts/travis-emscripten/publish_binary.sh
|
||||
./scripts/docker_build.sh
|
||||
./scripts/docs_version_pragma_check.sh
|
||||
./scripts/uniqueErrors.sh
|
||||
./scripts/report_errors.sh
|
||||
./scripts/tests.sh
|
||||
./scripts/docker_deploy.sh
|
||||
./scripts/bytecodecompare/storebytecode.sh
|
||||
./scripts/deps-ppa/static_z3.sh
|
||||
./scripts/ASTImportTest.sh
|
||||
./scripts/install_static_z3.sh
|
||||
./scripts/install_obsolete_jsoncpp_1_7_4.sh
|
||||
./scripts/install_deps.sh
|
||||
./scripts/build.sh
|
||||
./scripts/check_style.sh
|
||||
./scripts/run_proofs.sh
|
||||
./scripts/common_cmdline.sh
|
||||
./scripts/docker_deploy_manual.sh
|
||||
./scripts/endToEndExtraction/create_traces.sh
|
||||
./scripts/release.sh
|
||||
./scripts/download_ossfuzz_corpus.sh
|
||||
./scripts/release_ppa.sh
|
||||
./scripts/install_cmake.sh
|
||||
./scripts/release_emscripten.sh
|
||||
./scripts/create_source_tarball.sh
|
||||
./scripts/docs.sh
|
||||
./.circleci/soltest.sh
|
||||
./.circleci/osx_install_dependencies.sh
|
||||
./.circleci/soltest_all.sh
|
Loading…
Reference in New Issue
Block a user