diff options
author | chriseth <chris@ethereum.org> | 2018-11-13 17:59:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 17:59:42 +0800 |
commit | ac980fb89b6e7d74a5b1625daa3d81a3c3b71ab0 (patch) | |
tree | c82978af4a12cafb665889b2d09fa4abc00628ea | |
parent | b14eec5babb416edf49aa15d6b4765dd579da823 (diff) | |
parent | 5256da03db0a2b24c4bb66ead211a8229c9371af (diff) | |
download | dexon-solidity-ac980fb89b6e7d74a5b1625daa3d81a3c3b71ab0.tar.gz dexon-solidity-ac980fb89b6e7d74a5b1625daa3d81a3c3b71ab0.tar.zst dexon-solidity-ac980fb89b6e7d74a5b1625daa3d81a3c3b71ab0.zip |
Merge pull request #5400 from ethereum/fixcheckstyle
Fix check style script.
-rw-r--r-- | docs/miscellaneous.rst | 4 | ||||
-rwxr-xr-x | scripts/check_style.sh | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index 8e4e8b99..21978ded 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -31,14 +31,14 @@ Statically-sized variables (everything except mapping and dynamically-sized arra declaring your storage variables in the order of ``uint128, uint128, uint256`` instead of ``uint128, uint256, uint128``, as the former will only take up two slots of storage whereas the latter will take up three. - + .. note:: The layout of state variables in storage is considered to be part of the external interface of Solidity due to the fact that storage pointers can be passed to libraries. This means that any change to the rules outlined in this section is considered a breaking change of the language and due to its critical nature should be considered very carefully before being executed. - + The elements of structs and arrays are stored after each other, just as if they were given explicitly. diff --git a/scripts/check_style.sh b/scripts/check_style.sh index a8557a54..4f716d66 100755 --- a/scripts/check_style.sh +++ b/scripts/check_style.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -REPO_ROOT="$(dirname "$0")"/.. - ( +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" != "" ]] @@ -12,10 +12,7 @@ then echo "$WHITESPACE" >&2 exit 1 fi -) -( -cd $REPO_ROOT FORMATERROR=$( ( git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp' |