mirror of
https://github.com/super-linter/super-linter.git
synced 2025-01-13 07:11:23 -05:00
adding some small cleanup
This commit is contained in:
parent
a2df874c1a
commit
ae7b7f0e53
1 changed files with 8 additions and 6 deletions
|
@ -268,12 +268,13 @@ GetLinterVersions() {
|
||||||
# Get the version #
|
# Get the version #
|
||||||
###################
|
###################
|
||||||
if [[ "$LINTER" == "arm-ttk" ]]; then
|
if [[ "$LINTER" == "arm-ttk" ]]; then
|
||||||
|
# Need specific command for ARM
|
||||||
mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "$ARM_TTK_PSD1" | xargs 2>&1)
|
mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "$ARM_TTK_PSD1" | xargs 2>&1)
|
||||||
|
|
||||||
elif [[ "$LINTER" == "protolint" ]]; then
|
elif [[ "$LINTER" == "protolint" ]]; then
|
||||||
|
# Need specific command for Protolint
|
||||||
mapfile -t GET_VERSION_CMD < <(echo "--version not supported")
|
mapfile -t GET_VERSION_CMD < <(echo "--version not supported")
|
||||||
|
|
||||||
else
|
else
|
||||||
|
# Standard version command
|
||||||
mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1)
|
mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -294,6 +295,7 @@ GetLinterVersions() {
|
||||||
echo -e "${NC}${F[B]}Successfully found version for ${F[W]}[$LINTER]${F[B]}: ${F[W]}${GET_VERSION_CMD[*]}${NC}"
|
echo -e "${NC}${F[B]}Successfully found version for ${F[W]}[$LINTER]${F[B]}: ${F[W]}${GET_VERSION_CMD[*]}${NC}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Print version footers #
|
# Print version footers #
|
||||||
#########################
|
#########################
|
||||||
|
@ -448,13 +450,13 @@ DetectOpenAPIFile() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
#### Function DetectARMFile ################################################
|
#### Function DetectARMFile ####################################################
|
||||||
DetectARMFile()
|
DetectARMFile()
|
||||||
{
|
{
|
||||||
################
|
################
|
||||||
# Pull in vars #
|
# Pull in vars #
|
||||||
################
|
################
|
||||||
FILE="$1"
|
FILE="$1" # Name of the file/path we are validating
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Check the file for keywords #
|
# Check the file for keywords #
|
||||||
|
@ -473,12 +475,12 @@ DetectARMFile()
|
||||||
########################
|
########################
|
||||||
# Found string in file #
|
# Found string in file #
|
||||||
########################
|
########################
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
###################
|
###################
|
||||||
# No string match #
|
# No string match #
|
||||||
###################
|
###################
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in a new issue