Skip to content

Commit

Permalink
Disable shellcheck on sourced scripts
Browse files Browse the repository at this point in the history
Turns off shellcheck parsing sourced scripts and removes some shellcheck
directives that are no longer necessary.
  • Loading branch information
WalterKolczynski-NOAA committed Sep 29, 2022
1 parent 1e95aee commit 0824cb0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Global settings for Spellcheck (https://github.com/koalaman/shellcheck)
enable=all

external-sources=false

# Disable variable referenced but not assigned
disable=SC2154


5 changes: 0 additions & 5 deletions jobs/JGLOBAL_ATMOS_POST
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#! /usr/bin/env bash

# shellcheck source=ush/preamble.sh
source "${HOMEgfs}/ush/preamble.sh"

export RUN_ENVIR=${RUN_ENVIR:-"nco"}
Expand All @@ -12,7 +11,6 @@ configs="base post"
export EXPDIR=${EXPDIR:-${HOMEgfs}/parm/config}
config_path=${EXPDIR:-${PACKAGEROOT}/gfs.${gfs_ver}/parm/config}
for config in ${configs}; do
# shellcheck source-path=parm/config
. "${config_path}/config.${config}"
status=$?
(( status != 0 )) && exit "${status}"
Expand All @@ -22,7 +20,6 @@ done
##########################################
# Source machine runtime environment
##########################################
# shellcheck source-path=env
. "${HOMEgfs}/env/${machine}.env" post
status=$?
(( status != 0 )) && exit "${status}"
Expand All @@ -43,9 +40,7 @@ cd "${DATA}" || exit 1
##############################################
export cycle="t${cyc}z"
setpdy.sh
# shellcheck disable=SC1091
. ./PDY
# shellcheck disable=


##############################################
Expand Down
1 change: 0 additions & 1 deletion scripts/exgdas_atmos_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# echo "-----------------------------------------------------"
#####################################################################

# shellcheck source=ush/preamble.sh
source "${HOMEgfs}/ush/preamble.sh"

cd "${DATA}" || exit 1
Expand Down
1 change: 1 addition & 0 deletions ush/gfs_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export POSTGPEXEC=${POSTGPEXEC:-${EXECgfs}/upp.x}
export OVERPARMEXEC=${OVERPARMEXEC:-${EXECgfs}/overparm_grib}
export POSTGPLIST=${POSTGPLIST:-/dev/null}
export INISCRIPT=${INISCRIPT:-}
# Ignore warning about single quote not subtituting now
# shellcheck disable=SC2016
export ERRSCRIPT=${ERRSCRIPT:-'eval (( err == 0 ))'}
# shellcheck disable=
Expand Down

0 comments on commit 0824cb0

Please sign in to comment.