mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5400 from ethereum/fixcheckstyle
Fix check style script.
This commit is contained in:
commit
ac980fb89b
@ -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
|
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
|
``uint128, uint256, uint128``, as the former will only take up two slots of storage whereas the
|
||||||
latter will take up three.
|
latter will take up three.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
The layout of state variables in storage is considered to be part of the external interface
|
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
|
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
|
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
|
of the language and due to its critical nature should be considered very carefully before
|
||||||
being executed.
|
being executed.
|
||||||
|
|
||||||
|
|
||||||
The elements of structs and arrays are stored after each other, just as if they were given explicitly.
|
The elements of structs and arrays are stored after each other, just as if they were given explicitly.
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
REPO_ROOT="$(dirname "$0")"/..
|
|
||||||
|
|
||||||
(
|
(
|
||||||
|
REPO_ROOT="$(dirname "$0")"/..
|
||||||
cd $REPO_ROOT
|
cd $REPO_ROOT
|
||||||
|
|
||||||
WHITESPACE=$(git grep -n -I -E "^.*[[:space:]]+$" | grep -v "test/libsolidity/ASTJSON\|test/compilationTests/zeppelin/LICENSE")
|
WHITESPACE=$(git grep -n -I -E "^.*[[:space:]]+$" | grep -v "test/libsolidity/ASTJSON\|test/compilationTests/zeppelin/LICENSE")
|
||||||
|
|
||||||
if [[ "$WHITESPACE" != "" ]]
|
if [[ "$WHITESPACE" != "" ]]
|
||||||
@ -12,10 +12,7 @@ then
|
|||||||
echo "$WHITESPACE" >&2
|
echo "$WHITESPACE" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
cd $REPO_ROOT
|
|
||||||
FORMATERROR=$(
|
FORMATERROR=$(
|
||||||
(
|
(
|
||||||
git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp'
|
git grep -nIE "\<(if|for)\(" -- '*.h' '*.cpp'
|
||||||
|
Loading…
Reference in New Issue
Block a user