Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 559 Bytes

ignore_error.md

File metadata and controls

27 lines (18 loc) · 559 Bytes

Ignore shellcheck Error

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.

Resources and References