be more standard with shellcheck disables

pull/784/head
joshr 2 years ago
parent 2f60a39c93
commit 722b7bc55e

@ -33,7 +33,7 @@ fi
: "${TMPDIR:=/tmp}"
# AWK scripts:
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_FSDB_HAS_RECORD='
BEGIN { FS=":"; OFS=":"; cnt=0; }
{
@ -45,7 +45,7 @@ BEGIN { FS=":"; OFS=":"; cnt=0; }
END { if ( cnt > 0 ) print "0"; else print "1"; }
'
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_FSDB_RM_RECORD='
BEGIN { FS=":"; OFS=":"; }
{
@ -56,7 +56,7 @@ BEGIN { FS=":"; OFS=":"; }
}
'
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_FSDB_CLEAR_HASHES='
BEGIN { FS=":"; OFS=":"; }
{
@ -64,7 +64,7 @@ BEGIN { FS=":"; OFS=":"; }
}
'
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_GPG_VER_CHECK='
/^gpg/{
version=$3
@ -103,6 +103,7 @@ GPG_VER_MIN_21="$($SECRETS_GPG_COMMAND --version | gawk "$AWK_GPG_VER_CHECK")"
# Bash:
# echos 0 if function exists, otherwise non-zero
function _function_exists {
local function_name="$1" # required
@ -475,7 +476,7 @@ function _find_and_clean {
local root
root=$(_get_git_root_path)
# shellcheck disable=2086
# shellcheck disable=SC2086
find "$root" -path "$pattern" -type f -print0 | xargs -0 rm -f$verbose_opt
}

@ -3,7 +3,7 @@
# support for freebsd. Mostly the same as MacOS.
# shellcheck disable=1117
# shellcheck disable=SC1117
function __replace_in_file_freebsd {
sed -i.bak "s/^\($1[[:space:]]*=[[:space:]]*\).*\$/\1$2/" "$3"
}

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=1117
# shellcheck disable=SC1117
function __replace_in_file_linux {
sed -i.bak "s/^\($1\s*=\s*\).*\$/\1$2/" "$3"
}

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck disable=1117
# shellcheck disable=SC1117
function __replace_in_file_osx {
sed -i.bak "s/^\($1[[:space:]]*=[[:space:]]*\).*\$/\1$2/" "$3"
}

@ -4,7 +4,7 @@
function clean {
OPTIND=1
# shellcheck disable=2034
# shellcheck disable=SC2034
while getopts 'vh' opt; do
case "$opt" in
v) _SECRETS_VERBOSE=1;;

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_FSDB_UPDATE_HASH='
BEGIN { FS=":"; OFS=":"; }
{

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_ADD_TO_GITIGNORE='
BEGIN {
cnt=0

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=2016
# shellcheck disable=SC2016
AWK_GPG_KEY_CNT='
BEGIN { cnt=0; OFS=":"; FS=":"; }
flag=0; $1 == "pub" { cnt++ }
@ -77,7 +77,7 @@ function tell {
start_key_cnt=$(get_gpg_key_count)
for email in "${emails[@]}"; do
_temporary_file # note that `_temporary_file` will export `temporary_filename` var.
# shellcheck disable=2154
# shellcheck disable=SC2154
local keyfile="$temporary_filename"
# 3>&- closes fd 3 for bats, see https://github.com/bats-core/bats-core#file-descriptor-3-read-this-if-bats-hangs

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# shellcheck disable=2034
# shellcheck disable=SC2034
GITSECRET_VERSION='0.5.0-alpha1'

Loading…
Cancel
Save