mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4897 from ethereum/trailingWhitespaceDetection
Trailing whitespace detection script and circleci job.
This commit is contained in:
commit
8da1f25030
@ -179,6 +179,15 @@ jobs:
|
|||||||
name: Check spelling
|
name: Check spelling
|
||||||
command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt
|
command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt
|
||||||
|
|
||||||
|
test_trailing_whitespace:
|
||||||
|
docker:
|
||||||
|
- image: buildpack-deps:artful
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Check for trailing whitespace
|
||||||
|
command: ./scripts/detect_trailing_whitespace.sh
|
||||||
|
|
||||||
test_buglist:
|
test_buglist:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node
|
- image: circleci/node
|
||||||
@ -263,6 +272,7 @@ workflows:
|
|||||||
build_all:
|
build_all:
|
||||||
jobs:
|
jobs:
|
||||||
- test_check_spelling: *build_on_tags
|
- test_check_spelling: *build_on_tags
|
||||||
|
- test_trailing_whitespace: *build_on_tags
|
||||||
- test_buglist: *build_on_tags
|
- test_buglist: *build_on_tags
|
||||||
- build_emscripten: *build_on_tags
|
- build_emscripten: *build_on_tags
|
||||||
- test_emscripten_solcjs:
|
- test_emscripten_solcjs:
|
||||||
|
@ -1827,7 +1827,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
|
|||||||
auto funKind = _functionType.kind();
|
auto funKind = _functionType.kind();
|
||||||
|
|
||||||
solAssert(funKind != FunctionType::Kind::BareStaticCall || m_context.evmVersion().hasStaticCall(), "");
|
solAssert(funKind != FunctionType::Kind::BareStaticCall || m_context.evmVersion().hasStaticCall(), "");
|
||||||
|
|
||||||
bool returnSuccessConditionAndReturndata = funKind == FunctionType::Kind::BareCall || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::BareStaticCall;
|
bool returnSuccessConditionAndReturndata = funKind == FunctionType::Kind::BareCall || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::BareStaticCall;
|
||||||
bool isCallCode = funKind == FunctionType::Kind::BareCallCode;
|
bool isCallCode = funKind == FunctionType::Kind::BareCallCode;
|
||||||
bool isDelegateCall = funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::DelegateCall;
|
bool isDelegateCall = funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::DelegateCall;
|
||||||
|
15
scripts/detect_trailing_whitespace.sh
Executable file
15
scripts/detect_trailing_whitespace.sh
Executable file
@ -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
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user