Change 'function' style (#3364)

This commit is contained in:
Casper 2023-05-26 01:01:41 +02:00 committed by GitHub
parent cf74127f78
commit 37ca0f9ba9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 233 additions and 466 deletions

View file

@ -396,8 +396,7 @@ function _container_is_running() {
#
# @param ${1} = directory
# @param ${2} = number of files that should be in ${1}
function _count_files_in_directory_in_container()
{
function _count_files_in_directory_in_container() {
local DIRECTORY=${1:?No directory provided}
local NUMBER_OF_LINES=${2:?No line count provided}

View file

@ -16,8 +16,7 @@ SHELLCHECK_VERSION='0.9.0'
# shellcheck source=./../../target/scripts/helpers/log.sh
source "${REPOSITORY_ROOT}/target/scripts/helpers/log.sh"
function _eclint
{
function _eclint() {
if docker run --rm --tty \
--volume "${REPOSITORY_ROOT}:/ci:ro" \
--workdir "/ci" \
@ -31,8 +30,7 @@ function _eclint
fi
}
function _hadolint
{
function _hadolint() {
if docker run --rm --tty \
--volume "${REPOSITORY_ROOT}:/ci:ro" \
--workdir "/ci" \
@ -46,8 +44,7 @@ function _hadolint
fi
}
function _shellcheck
{
function _shellcheck() {
local F_SH F_BIN F_BATS
# File paths for shellcheck:
@ -119,8 +116,7 @@ function _shellcheck
fi
}
function _main
{
function _main() {
case "${1:-}" in
( 'eclint' ) _eclint ;;
( 'hadolint' ) _hadolint ;;