Fix linter issues

This commit is contained in:
patvdv 2018-10-28 21:56:14 +01:00
parent 333225642a
commit 7284a0866f
5 changed files with 19 additions and 38 deletions

View File

@ -1183,10 +1183,8 @@ case ${ARG_ACTION} in
# set & initialize STDOUT/STDERR locations (not in init_hc()!) # set & initialize STDOUT/STDERR locations (not in init_hc()!)
HC_STDOUT_LOG="${TMP_DIR}/${HC_RUN}.stdout.log.$$" HC_STDOUT_LOG="${TMP_DIR}/${HC_RUN}.stdout.log.$$"
HC_STDERR_LOG="${TMP_DIR}/${HC_RUN}.stderr.log.$$" HC_STDERR_LOG="${TMP_DIR}/${HC_RUN}.stderr.log.$$"
# shellcheck disable=SC2188 : >${HC_STDOUT_LOG} 2>/dev/null
>${HC_STDOUT_LOG} 2>/dev/null : >${HC_STDERR_LOG} 2>/dev/null
# shellcheck disable=SC2188
>${HC_STDERR_LOG} 2>/dev/null
# --check-host handling: alternative configuration file, mangle ARG_CONFIG_FILE & HC_TIME_OUT # --check-host handling: alternative configuration file, mangle ARG_CONFIG_FILE & HC_TIME_OUT
if (( ARG_CHECK_HOST == 1 )) if (( ARG_CHECK_HOST == 1 ))

View File

@ -135,34 +135,29 @@ fi
# check state file & TMP_FILEs # check state file & TMP_FILEs
[[ -r ${_STATE_FILE} ]] || { [[ -r ${_STATE_FILE} ]] || {
# shellcheck disable=SC2188 : >${_STATE_FILE}
>${_STATE_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create new state file at ${_STATE_FILE}" warn "failed to create new state file at ${_STATE_FILE}"
return 1 return 1
} }
log "created new state file at ${_STATE_FILE}" log "created new state file at ${_STATE_FILE}"
} }
# shellcheck disable=SC2188 : >${_TMP_INCL_FILE}
>${_TMP_INCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_INCL_FILE}" warn "failed to create temporary file at ${_TMP_INCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP_EXCL_FILE}
>${_TMP_EXCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_EXCL_FILE}" warn "failed to create temporary file at ${_TMP_EXCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP1_FILE}
>${_TMP1_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP1_FILE}" warn "failed to create temporary file at ${_TMP1_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP2_FILE}
>${_TMP2_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP2_FILE}" warn "failed to create temporary file at ${_TMP2_FILE}"
return 1 return 1

View File

@ -135,34 +135,29 @@ fi
# check state file & TMP_FILEs # check state file & TMP_FILEs
[[ -r ${_STATE_FILE} ]] || { [[ -r ${_STATE_FILE} ]] || {
# shellcheck disable=SC2188 : >${_STATE_FILE}
>${_STATE_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create new state file at ${_STATE_FILE}" warn "failed to create new state file at ${_STATE_FILE}"
return 1 return 1
} }
log "created new state file at ${_STATE_FILE}" log "created new state file at ${_STATE_FILE}"
} }
# shellcheck disable=SC2188 : >${_TMP_INCL_FILE}
>${_TMP_INCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_INCL_FILE}" warn "failed to create temporary file at ${_TMP_INCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP_EXCL_FILE}
>${_TMP_EXCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_EXCL_FILE}" warn "failed to create temporary file at ${_TMP_EXCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP1_FILE}
>${_TMP1_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP1_FILE}" warn "failed to create temporary file at ${_TMP1_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP2_FILE}
>${_TMP2_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP2_FILE}" warn "failed to create temporary file at ${_TMP2_FILE}"
return 1 return 1

View File

@ -105,14 +105,12 @@ then
fi fi
# check TMP_FILEs # check TMP_FILEs
# shellcheck disable=SC2188 : >${_TMP1_FILE}
>${_TMP1_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP1_FILE}" warn "failed to create temporary file at ${_TMP1_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP2_FILE}
>${_TMP2_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP2_FILE}" warn "failed to create temporary file at ${_TMP2_FILE}"
return 1 return 1

View File

@ -136,34 +136,29 @@ fi
# check state file & TMP_FILEs # check state file & TMP_FILEs
[[ -r ${_STATE_FILE} ]] || { [[ -r ${_STATE_FILE} ]] || {
# shellcheck disable=SC2188 : >${_STATE_FILE}
>${_STATE_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create new state file at ${_STATE_FILE}" warn "failed to create new state file at ${_STATE_FILE}"
return 1 return 1
} }
log "created new state file at ${_STATE_FILE}" log "created new state file at ${_STATE_FILE}"
} }
# shellcheck disable=SC2188 : >${_TMP_INCL_FILE}
>${_TMP_INCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_INCL_FILE}" warn "failed to create temporary file at ${_TMP_INCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP_EXCL_FILE}
>${_TMP_EXCL_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP_EXCL_FILE}" warn "failed to create temporary file at ${_TMP_EXCL_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP1_FILE}
>${_TMP1_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP1_FILE}" warn "failed to create temporary file at ${_TMP1_FILE}"
return 1 return 1
} }
# shellcheck disable=SC2188 : >${_TMP2_FILE}
>${_TMP2_FILE}
(( $? > 0 )) && { (( $? > 0 )) && {
warn "failed to create temporary file at ${_TMP2_FILE}" warn "failed to create temporary file at ${_TMP2_FILE}"
return 1 return 1