When you want to ignore a shellcheck
rule. You can do this using a comment in your code.
hexToAscii() {
# shellcheck disable=SC2059
printf "\x$1"
}
Lifted from shellcheck wiki.
If you want to ignore multiple rules, use comma (,
) to separate the rules indicators.
# shellcheck disable=SC2116,SC2086
hash=$(echo ${hash}) # trim spaces
Lifted from shellcheck wiki.