Use consistent syntax for Bash function declarations

This commit is contained in:
Kamil Śliwak
2021-11-08 16:34:07 +01:00
parent bc2402e76f
commit 7ccdbd5b08
17 changed files with 57 additions and 45 deletions
+2 -2
View File
@@ -154,7 +154,7 @@ function ask_expectation_update
# General helper function for testing SOLC behaviour, based on file name, compile opts, exit code, stdout and stderr.
# An failure is expected.
function test_solc_behaviour()
function test_solc_behaviour
{
local filename="${1}"
local solc_args
@@ -288,7 +288,7 @@ EOF
}
function test_solc_assembly_output()
function test_solc_assembly_output
{
local input="${1}"
local expected="${2}"
+4 -4
View File
@@ -10,11 +10,11 @@ REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd)
if [ "$CIRCLECI" ]
then
function printTask() { echo "$(tput bold)$(tput setaf 2)$1$(tput setaf 7)"; }
function printError() { echo "$(tput setaf 1)$1$(tput setaf 7)"; }
function printTask { echo "$(tput bold)$(tput setaf 2)$1$(tput setaf 7)"; }
function printError { echo "$(tput setaf 1)$1$(tput setaf 7)"; }
else
function printTask() { echo "$(tput bold)$(tput setaf 2)$1$(tput sgr0)"; }
function printError() { echo "$(tput setaf 1)$1$(tput sgr0)"; }
function printTask { echo "$(tput bold)$(tput setaf 2)$1$(tput sgr0)"; }
function printError { echo "$(tput setaf 1)$1$(tput sgr0)"; }
fi
printTask "Checking docs examples style"
+4 -2
View File
@@ -187,7 +187,8 @@ function run_test
$test_fn
}
function optimizer_settings_for_level {
function optimizer_settings_for_level
{
local level="$1"
case "$level" in
@@ -201,7 +202,8 @@ function optimizer_settings_for_level {
esac
}
function truffle_compiler_settings {
function truffle_compiler_settings
{
local solc_path="$1"
local level="$2"
local evm_version="$3"
+1 -1
View File
@@ -15,7 +15,7 @@ FILETMP=$(mktemp -d)
cd "$FILETMP" || exit 1
function testFile()
function testFile
{
set +e
ALLOUTPUT=$($SOLC --combined-json ast --pretty-json "$@" --stop-after parsing 2>&1)