mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-13 20:39:33 -05:00
Fix shellcheck exclusions
This commit is contained in:
parent
d74f72b208
commit
0101612f7a
3 changed files with 8 additions and 16 deletions
|
@ -87,8 +87,7 @@ CheckGHEProcess()
|
||||||
####################################################
|
####################################################
|
||||||
# Check to see if the process is alive and running #
|
# Check to see if the process is alive and running #
|
||||||
####################################################
|
####################################################
|
||||||
# shellcheck disable=SC2009
|
CHECK_PROCESS_CMD=$(pgrep -f "$GHE_APPLY_COMMAND" 2>&1)
|
||||||
CHECK_PROCESS_CMD=$(ps -aef |grep "$GHE_APPLY_COMMAND" |grep -v grep 2>&1)
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Load the error code #
|
# Load the error code #
|
||||||
|
|
|
@ -166,7 +166,7 @@ ValidateInput()
|
||||||
##############################
|
##############################
|
||||||
# Get the name of the branch #
|
# Get the name of the branch #
|
||||||
##############################
|
##############################
|
||||||
BRANCH_NAME=$(git branch --contains "$GITHUB_SHA" |awk '{print $2}' 2>&1)
|
BRANCH_NAME=$(git -C "$GITHUB_WORKSPACE" branch --contains "$GITHUB_SHA" |awk '{print $2}' 2>&1)
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Load the error code #
|
# Load the error code #
|
||||||
|
@ -407,8 +407,7 @@ UploadImage()
|
||||||
REPO=$(echo "$GET_INFO_CMD" | awk '{print $1}')
|
REPO=$(echo "$GET_INFO_CMD" | awk '{print $1}')
|
||||||
TAG=$(echo "$GET_INFO_CMD" | awk '{print $2}')
|
TAG=$(echo "$GET_INFO_CMD" | awk '{print $2}')
|
||||||
IMAGE_ID=$(echo "$GET_INFO_CMD" | awk '{print $3}')
|
IMAGE_ID=$(echo "$GET_INFO_CMD" | awk '{print $3}')
|
||||||
# shellcheck disable=SC2116
|
SIZE="${GET_INFO_CMD##* }"
|
||||||
SIZE=$(echo "${GET_INFO_CMD##* }")
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Print the goods #
|
# Print the goods #
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# shellcheck disable=SC1003,SC2016,SC1091
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -265,8 +264,7 @@ GetLinterVersions()
|
||||||
###################
|
###################
|
||||||
# Get the version #
|
# Get the version #
|
||||||
###################
|
###################
|
||||||
# shellcheck disable=SC2207
|
mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1)
|
||||||
GET_VERSION_CMD=($("$LINTER" --version 2>&1))
|
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Load the error code #
|
# Load the error code #
|
||||||
|
@ -357,11 +355,9 @@ GetStandardRules()
|
||||||
# Only env vars that are marked as true
|
# Only env vars that are marked as true
|
||||||
GET_ENV_ARRAY=()
|
GET_ENV_ARRAY=()
|
||||||
if [[ "$LINTER" == "javascript" ]]; then
|
if [[ "$LINTER" == "javascript" ]]; then
|
||||||
# shellcheck disable=SC2207
|
mapfile -t GET_ENV_ARRAY < <(yq .env "$JAVASCRIPT_LINTER_RULES" | grep true)
|
||||||
GET_ENV_ARRAY=($(yq .env "$JAVASCRIPT_LINTER_RULES" |grep true))
|
|
||||||
elif [[ "$LINTER" == "typescript" ]]; then
|
elif [[ "$LINTER" == "typescript" ]]; then
|
||||||
# shellcheck disable=SC2207
|
mapfile -t GET_ENV_ARRAY < <(yq .env "$TYPESCRIPT_LINTER_RULES" | grep true)
|
||||||
GET_ENV_ARRAY=($(yq .env "$TYPESCRIPT_LINTER_RULES" |grep true))
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
|
@ -612,8 +608,7 @@ GetGitHubVars()
|
||||||
######################
|
######################
|
||||||
# Get the GitHub Org #
|
# Get the GitHub Org #
|
||||||
######################
|
######################
|
||||||
# shellcheck disable=SC2002
|
GITHUB_ORG=$(jq -r '.repository.owner.login' < "$GITHUB_EVENT_PATH" )
|
||||||
GITHUB_ORG=$(cat "$GITHUB_EVENT_PATH" | jq -r '.repository.owner.login' )
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Validate we have a value #
|
# Validate we have a value #
|
||||||
|
@ -629,8 +624,7 @@ GetGitHubVars()
|
||||||
#######################
|
#######################
|
||||||
# Get the GitHub Repo #
|
# Get the GitHub Repo #
|
||||||
#######################
|
#######################
|
||||||
# shellcheck disable=SC2002
|
GITHUB_REPO=$(jq -r '.repository.name' < "$GITHUB_EVENT_PATH" )
|
||||||
GITHUB_REPO=$(cat "$GITHUB_EVENT_PATH"| jq -r '.repository.name' )
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Validate we have a value #
|
# Validate we have a value #
|
||||||
|
|
Loading…
Reference in a new issue