Simplify CI

Remove --ignore-reurn-value flag (it becomes useless with the new exit code strategy)
pull/1278/head
Josselin Feist 2 years ago
parent 1c9b05b117
commit c32b3e16b7
  1. 6
      scripts/ci_test_cli.sh
  2. 8
      scripts/ci_test_dapp.sh
  3. 6
      scripts/ci_test_embark.sh
  4. 8
      scripts/ci_test_etherlime.sh
  5. 16
      scripts/ci_test_etherscan.sh
  6. 7
      scripts/ci_test_truffle.sh
  7. 9
      slither/__main__.py
  8. 1
      slither/utils/command_line.py

@ -4,17 +4,17 @@
solc-select use 0.7.0
if ! slither "tests/config/test.sol" --solc-ast --ignore-return-value; then
if slither "tests/config/test.sol" --solc-ast; then
echo "--solc-ast failed"
exit 1
fi
if ! slither "tests/config/test.sol" --solc-disable-warnings --ignore-return-value; then
if slither "tests/config/test.sol" --solc-disable-warnings; then
echo "--solc-disable-warnings failed"
exit 1
fi
if ! slither "tests/config/test.sol" --disable-color --ignore-return-value; then
if slither "tests/config/test.sol" --disable-color; then
echo "--disable-color failed"
exit 1
fi

@ -15,9 +15,9 @@ nix-env -f "$HOME/.dapp/dapptools" -iA dapp seth solc hevm ethsign
dapp init
if slither . --detect external-function --fail-pedantic; then
exit 0
if slither . --detect external-function; then
echo "Dapp test failed"
exit 1
fi
echo "Dapp test failed"
exit 255
exit 0

@ -15,12 +15,10 @@ npm install -g embark@4.2.0
embark demo
cd embark_demo || exit 255
npm install
slither . --embark-overwrite-config --fail-pedantic
if [ $? -ne 255 ]
then
if slither . --embark-overwrite-config; then
echo "Embark test failed"
exit 255
fi
exit 0

@ -13,10 +13,10 @@ nvm use 10.17.0
npm i -g etherlime
etherlime init
slither . --fail-pedantic
if [ $? -ne 255 ]
then
if slither .; then
echo "Etherlime test failed"
exit 255
exit 1
fi
exit 0

@ -5,19 +5,15 @@
mkdir etherscan
cd etherscan || exit 255
slither 0x7F37f78cBD74481E593F9C737776F7113d76B315 --etherscan-apikey "$GITHUB_ETHERSCAN" --fail-pedantic
if [ $? -ne 255 ]
then
if slither 0x7F37f78cBD74481E593F9C737776F7113d76B315 --etherscan-apikey "$GITHUB_ETHERSCAN"; then
echo "Etherscan test failed"
exit 255
exit 1
fi
slither rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --etherscan-apikey "$GITHUB_ETHERSCAN" --fail-pedantic
if [ $? -ne 255 ]
then
if slither rinkeby:0xFe05820C5A92D9bc906D4A46F662dbeba794d3b7 --etherscan-apikey "$GITHUB_ETHERSCAN"; then
echo "Etherscan test failed"
exit 255
exit 1
fi
exit 0

@ -13,11 +13,10 @@ nvm use --lts
npm install -g truffle
truffle unbox metacoin
slither .
if [ $? -ne 0 ]
then
if slither .; then
echo "Truffle test failed"
exit 255
exit 1
fi
exit 0

@ -573,13 +573,6 @@ def parse_args(detector_classes, printer_classes): # pylint: disable=too-many-s
default=defaults_flag_in_config["skip_assembly"],
)
parser.add_argument(
"--ignore-return-value",
help=argparse.SUPPRESS,
action="store_true",
default=defaults_flag_in_config["ignore_return_value"],
)
parser.add_argument(
"--perf",
help=argparse.SUPPRESS,
@ -845,8 +838,6 @@ def main_impl(
len(detector_classes),
len(results_detectors),
)
if args.ignore_return_value:
return
except SlitherException as slither_exception:
output_error = str(slither_exception)

@ -47,7 +47,6 @@ defaults_flag_in_config = {
# debug command
"skip_assembly": False,
"legacy_ast": False,
"ignore_return_value": False,
"zip": None,
"zip_type": "lzma",
"show_ignored_findings": False,

Loading…
Cancel
Save