Skip to content

Commit

Permalink
fixed frameworkLint usage in other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
fchastanet committed Nov 21, 2023
1 parent 96d4902 commit fe9be3d
Show file tree
Hide file tree
Showing 18 changed files with 117 additions and 107 deletions.
4 changes: 2 additions & 2 deletions .framework-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# shellcheck disable=SC2034

REAL_SCRIPT_FILE="${REAL_SCRIPT_FILE:-$(readlink -e "$(realpath "${BASH_SOURCE[0]}")")}"
FRAMEWORK_ROOT_DIR="${FRAMEWORK_ROOT_DIR:-$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")/../.." && pwd -P)}"
FRAMEWORK_ROOT_DIR="${FRAMEWORK_ROOT_DIR:-$(cd "$(readlink -e "${REAL_SCRIPT_FILE%/*}")" && pwd -P)}"
FRAMEWORK_SRC_DIR="${FRAMEWORK_SRC_DIR:-${FRAMEWORK_ROOT_DIR}/src}"
FRAMEWORK_BIN_DIR="${FRAMEWORK_BIN_DIR:-${FRAMEWORK_ROOT_DIR}/bin}"
FRAMEWORK_VENDOR_DIR="${FRAMEWORK_VENDOR_DIR:-${FRAMEWORK_ROOT_DIR}/vendor}"
Expand All @@ -13,7 +13,7 @@ FRAMEWORK_FUNCTIONS_IGNORE_REGEXP="${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP:-^(Namesp
# describe the files that do not contain function to be imported
NON_FRAMEWORK_FILES_REGEXP="${NON_FRAMEWORK_FILES_REGEXP:-(^bin/|^hooks/|.framework-config|.bats$|/testsData/|^manualTests/|/_.sh$|/ZZZ.sh$|/__all.sh$|^src/_binaries|^src/_includes|^src/batsHeaders.sh$|^src/_standalone)}"
# describe the files that are allowed to not have an associated bats file
BATS_FILE_NOT_NEEDED_REGEXP="${BATS_FILE_NOT_NEEDED_REGEXP:-(^bin/|.framework-config|.bats$|/testsData/|^manualTests/|/_.sh$|/ZZZ.sh$|/__all.sh$|^src/batsHeaders.sh$|^src/_includes)}"
BATS_FILE_NOT_NEEDED_REGEXP="${BATS_FILE_NOT_NEEDED_REGEXP:-(^build.sh$|^bin/|.framework-config|.bats$|/testsData/|^manualTests/|/_.sh$|/ZZZ.sh$|/__all.sh$|^src/batsHeaders.sh$|^src/_includes)}"
# describe the files that are allowed to not have a function matching the filename
FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP="${FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP:-^bin/|^\.framework-config$|^build.sh$|\.tpl$|/testsData/|^manualTests/|\.bats$}"
# Source directories
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ repos:
exclude: ^doc/guides/Options/generate.*.md$

- repo: https://github.com/fchastanet/bash-tools-framework
rev: 1.1.5
rev: 1.1.6
hooks:
- id: fixShebangExecutionBit
- id: fixShebangExecutionBitGithubActions
Expand Down Expand Up @@ -103,7 +103,7 @@ repos:

# manual stage used to select github action with megalinter full config
- repo: https://github.com/fchastanet/bash-tools-framework
rev: 1.1.5
rev: 1.1.6
hooks:
- id: runUnitTests
# not manual as github will run UT with several versions of bash and arch
Expand Down
6 changes: 3 additions & 3 deletions bin/awkLint
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/buildBinFiles
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/buildPushDockerImage
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/definitionLint
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/doc
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/dockerLint
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/findShebangFiles
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
73 changes: 36 additions & 37 deletions bin/frameworkLint
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down Expand Up @@ -331,18 +331,6 @@ File::detectBashFile() {
fi
}

# @description print the resolved path relative to DIR
# do not check for path existence
# @arg $1 srcFile:String the file to resolve
# @arg $2 relativeTo:String the directory
# @stdout the resolved path relative to DIR
File::relativeToDir() {
local srcFile="$1"
local relativeTo="$2"

realpath -m --relative-to="${relativeTo}" "${srcFile}"
}

# @description allows to match a bash framework function based on the naming convention
# @warning this filter could extract bash framework functions that are actually commented in the source file
# @warning use FRAMEWORK_FUNCTIONS_IGNORE_REGEXP from .framework-config to filter unwanted functions
Expand Down Expand Up @@ -1475,7 +1463,7 @@ checkEachFunctionHasSrcFile() {
return 0
fi
if grep -q -E "${FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP}" <<<"${file}"; then
Log::displaySkipped "checkEachFunctionHasSrcFile - File ${file} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "checkEachFunctionHasSrcFile - File ${file} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches"
return 0
fi
readarray -t functionsToImport < <(
Expand All @@ -1487,13 +1475,14 @@ checkEachFunctionHasSrcFile() {
)
for functionToImport in "${functionsToImport[@]}"; do
if echo "${functionToImport}" | grep -q -E "${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP}"; then
Log::displaySkipped "checkEachFunctionHasSrcFile - File ${file} - Function ${functionToImport} rule FRAMEWORK_FUNCTIONS_IGNORE_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "checkEachFunctionHasSrcFile - File ${file} - Function ${functionToImport} rule FRAMEWORK_FUNCTIONS_IGNORE_REGEXP matches"
continue
fi
local fileNameToImport
fileNameToImport="$(echo "${functionToImport}" | sed -E 's#::#/#g').sh"

local found=0
local srcDir
for srcDir in "${FRAMEWORK_SRC_DIRS[@]}"; do
if [[ -f "${srcDir}/${fileNameToImport}" ]]; then
found=1
Expand All @@ -1511,37 +1500,47 @@ checkEachFunctionHasSrcFile() {
done
}

getRelativeSrcDir() {
File::relativeToDir "${FRAMEWORK_SRC_DIRS[0]}" "${FRAMEWORK_ROOT_DIR}"
}

deduceBashFunctionFromSrcFile() {
local srcFile="$1"
local result="${srcFile%.sh}"
result="${srcFile/$(getRelativeSrcDir)//}"
echo "${result//\//::}"
local file="$1"
local srcDir="$2"

local relativeFile
relativeFile="$(
echo "${file}" | sed -E -e "#${srcDir}##" |
grep -q -E "${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP}"
)"
echo "${relativeFile//\//::}"
}

checkEachSrcFileHasBatsFile() {
local file="$1"
if [[ "${file}" =~ ${BATS_FILE_NOT_NEEDED_REGEXP} ]]; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - rule BATS_FILE_NOT_NEEDED_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - rule BATS_FILE_NOT_NEEDED_REGEXP matches"
return 0
fi
if [[ ! "${file}" =~ .sh$ ]]; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - no suffix .sh"
return 0
fi
if [[ ! "${file}" =~ ^$(getRelativeSrcDir) ]]; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - src directory not declared in ${BASH_FRAMEWORK_CONFIG_FILE}"
local found=0
local srcDir
for srcDir in "${FRAMEWORK_SRC_DIRS[@]}"; do
if realpath --relative-to="${srcDir}" "${file}" &>/dev/null; then
found=1
fi
done
if [[ "${found}" = "0" ]]; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - src directory not declared in ${FRAMEWORK_SRC_DIRS[*]}"
return 0
fi
if deduceBashFunctionFromSrcFile "${file}" | grep -q -E "${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP}"; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - matching function name matches FRAMEWORK_FUNCTIONS_IGNORE_REGEXP defined in ${BASH_FRAMEWORK_CONFIG_FILE}"

if deduceBashFunctionFromSrcFile "${relativeFile}" "${srcDir}" |
grep -q -E "${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP}"; then
Log::displaySkipped "checkEachSrcFileHasBatsFile - File ${file} - matching function name matches FRAMEWORK_FUNCTIONS_IGNORE_REGEXP defined"
return 0
fi
local batsFile="${file%.*}.bats"
if [[ ! -f "${FRAMEWORK_ROOT_DIR}/${batsFile}" ]]; then
if [[ ! -f "${batsFile}" ]]; then
reportWarning "checkEachSrcFileHasBatsFile" "${file}" \
"missing bats file '${batsFile}'"
fi
Expand All @@ -1551,11 +1550,11 @@ checkEachSrcFileHasBatsFile() {
checkEachSrcFileHasOneFunctionCorrectlyNamed() {
local srcFile="$1"
if [[ "${srcFile}" =~ ${NON_FRAMEWORK_FILES_REGEXP} ]]; then
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - rule NON_FRAMEWORK_FILES_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - rule NON_FRAMEWORK_FILES_REGEXP matches"
return 0
fi
if grep -q -E "${FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP}" <<<"${srcFile}"; then
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches"
return 0
fi

Expand All @@ -1564,7 +1563,7 @@ checkEachSrcFileHasOneFunctionCorrectlyNamed() {
local file="${srcFile#src/}"
expectedFunctionName="$(sed -E 's#/#::#g' <<<"${file%.sh}")"
if echo "${expectedFunctionName}" | grep -q -E "${FRAMEWORK_FUNCTIONS_IGNORE_REGEXP}"; then
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - Function ${expectedFunctionName} - rule FRAMEWORK_FUNCTIONS_IGNORE_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "srcFileHasOneFunctionCorrectlyNamed - File ${srcFile} - Function ${expectedFunctionName} - rule FRAMEWORK_FUNCTIONS_IGNORE_REGEXP matches"
return 0
fi

Expand All @@ -1584,11 +1583,11 @@ checkEachSrcFileHasOneFunctionCorrectlyNamed() {
checkEachSrcFileHasCorrectShdoc() {
local srcFile="$1"
if [[ "${srcFile}" =~ ${NON_FRAMEWORK_FILES_REGEXP} ]]; then
Log::displaySkipped "checkEachSrcFileHasCorrectShDoc - File ${srcFile} - rule NON_FRAMEWORK_FILES_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "checkEachSrcFileHasCorrectShDoc - File ${srcFile} - rule NON_FRAMEWORK_FILES_REGEXP matches"
return 0
fi
if grep -q -E "${FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP}" <<<"${srcFile}"; then
Log::displaySkipped "checkEachSrcFileHasCorrectShDoc - File ${srcFile} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches in ${BASH_FRAMEWORK_CONFIG_FILE}"
Log::displaySkipped "checkEachSrcFileHasCorrectShDoc - File ${srcFile} - rule FRAMEWORK_FILES_FUNCTION_MATCHING_IGNORE_REGEXP matches"
return 0
fi

Expand All @@ -1600,7 +1599,7 @@ checkEachSrcFileHasCorrectShdoc() {
# @see https://regex101.com/r/5oMFQi/1
# shellcheck disable=SC2120
function filterInvalidAnnotationNames() {
grep -v -E '^(name|file|brief|description|section|example|option|arg|noargs|set|env|exitcode|stdin|stdout|stderr|see|warning|require|feature|trap|deprecated|internal)$' "$@"
grep -v -E '^(name|file|brief|description|section|example|option|arg|noargs|set|env|exitcode|stdin|stdout|stderr|see|warning|require|feature|trap|deprecated|internal|generated)$' "$@"
}

function checkValidAnnotationsAreUsed() {
Expand Down
6 changes: 3 additions & 3 deletions bin/installFacadeExample
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/megalinter
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/plantuml
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
10 changes: 5 additions & 5 deletions bin/runBuildContainer

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions bin/shellcheckLint
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
6 changes: 3 additions & 3 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,12 @@ Env::requireLoad() {
# BASH_FRAMEWORK_ENV_FILES is an array
configFiles+=("${BASH_FRAMEWORK_ENV_FILES[@]}")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -f "$(pwd)/.framework-config" ]]; then
configFiles+=("$(pwd)/.framework-config")
fi
if [[ -f "${FRAMEWORK_ROOT_DIR}/.framework-config" ]]; then
configFiles+=("${FRAMEWORK_ROOT_DIR}/.framework-config")
fi
if [[ -n "${optionBashFrameworkConfig}" && -f "${optionBashFrameworkConfig}" ]]; then
# shellcheck disable=SC2034
configFiles+=("${optionBashFrameworkConfig}")
Expand Down
Loading

0 comments on commit fe9be3d

Please sign in to comment.