diff options
author | chriseth <chris@ethereum.org> | 2018-09-05 00:20:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 00:20:57 +0800 |
commit | 8da1f25030b98bd230649c057f02ed3a23d899d1 (patch) | |
tree | 15cedda7c361529577f1afb5ad31f18d8b1fa58f /scripts | |
parent | 47f67f3567ba92b186594fec15d8400d4d9e753a (diff) | |
parent | 1ae6ec9038d83a82d5e8b57a8c6138dd4970d422 (diff) | |
download | dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar.gz dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar.bz2 dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar.lz dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar.xz dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.tar.zst dexon-solidity-8da1f25030b98bd230649c057f02ed3a23d899d1.zip |
Merge pull request #4897 from ethereum/trailingWhitespaceDetection
Trailing whitespace detection script and circleci job.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/detect_trailing_whitespace.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/detect_trailing_whitespace.sh b/scripts/detect_trailing_whitespace.sh new file mode 100755 index 00000000..1a136a10 --- /dev/null +++ b/scripts/detect_trailing_whitespace.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +REPO_ROOT="$(dirname "$0")"/.. + +( +cd $REPO_ROOT +WHITESPACE=$(git grep -n -I -E "^.*[[:space:]]+$" | grep -v "test/libsolidity/ASTJSON\|test/compilationTests/zeppelin/LICENSE") + +if [[ "$WHITESPACE" != "" ]] +then + echo "Error: Trailing whitespace found:" >&2 + echo "$WHITESPACE" >&2 + exit 1 +fi +) |