Fix shellcheck exclusions

This commit is contained in:
Eric Nemchik 2020-06-22 08:59:31 -05:00
parent d74f72b208
commit 0101612f7a
3 changed files with 8 additions and 16 deletions

View file

@ -87,8 +87,7 @@ CheckGHEProcess()
####################################################
# Check to see if the process is alive and running #
####################################################
# shellcheck disable=SC2009
CHECK_PROCESS_CMD=$(ps -aef |grep "$GHE_APPLY_COMMAND" |grep -v grep 2>&1)
CHECK_PROCESS_CMD=$(pgrep -f "$GHE_APPLY_COMMAND" 2>&1)
#######################
# Load the error code #

View file

@ -166,7 +166,7 @@ ValidateInput()
##############################
# 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 #
@ -407,8 +407,7 @@ UploadImage()
REPO=$(echo "$GET_INFO_CMD" | awk '{print $1}')
TAG=$(echo "$GET_INFO_CMD" | awk '{print $2}')
IMAGE_ID=$(echo "$GET_INFO_CMD" | awk '{print $3}')
# shellcheck disable=SC2116
SIZE=$(echo "${GET_INFO_CMD##* }")
SIZE="${GET_INFO_CMD##* }"
###################
# Print the goods #

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
# shellcheck disable=SC1003,SC2016,SC1091
################################################################################
################################################################################
@ -265,8 +264,7 @@ GetLinterVersions()
###################
# Get the version #
###################
# shellcheck disable=SC2207
GET_VERSION_CMD=($("$LINTER" --version 2>&1))
mapfile -t GET_VERSION_CMD < <("$LINTER" --version 2>&1)
#######################
# Load the error code #
@ -357,11 +355,9 @@ GetStandardRules()
# Only env vars that are marked as true
GET_ENV_ARRAY=()
if [[ "$LINTER" == "javascript" ]]; then
# shellcheck disable=SC2207
GET_ENV_ARRAY=($(yq .env "$JAVASCRIPT_LINTER_RULES" |grep true))
mapfile -t GET_ENV_ARRAY < <(yq .env "$JAVASCRIPT_LINTER_RULES" | grep true)
elif [[ "$LINTER" == "typescript" ]]; then
# shellcheck disable=SC2207
GET_ENV_ARRAY=($(yq .env "$TYPESCRIPT_LINTER_RULES" |grep true))
mapfile -t GET_ENV_ARRAY < <(yq .env "$TYPESCRIPT_LINTER_RULES" | grep true)
fi
#######################
@ -612,8 +608,7 @@ GetGitHubVars()
######################
# Get the GitHub Org #
######################
# shellcheck disable=SC2002
GITHUB_ORG=$(cat "$GITHUB_EVENT_PATH" | jq -r '.repository.owner.login' )
GITHUB_ORG=$(jq -r '.repository.owner.login' < "$GITHUB_EVENT_PATH" )
############################
# Validate we have a value #
@ -629,8 +624,7 @@ GetGitHubVars()
#######################
# Get the GitHub Repo #
#######################
# shellcheck disable=SC2002
GITHUB_REPO=$(cat "$GITHUB_EVENT_PATH"| jq -r '.repository.name' )
GITHUB_REPO=$(jq -r '.repository.name' < "$GITHUB_EVENT_PATH" )
############################
# Validate we have a value #