Created Ignore (markdown)

koalaman
2015-09-05 15:41:27 -07:00
parent bf1753e01a
commit a6a5db7ef7

24
Ignore.md Normal file

@@ -0,0 +1,24 @@
## Ignoring errors
To ignore a shellcheck error, you can do one of three things:
### Ignoring one specific instance in a file
Use a [[directive]] to disable a certain instance:
hexToAscii() {
# shellcheck disable=SC2059
printf "\x$1"
}
### Ignoring errors in one specific run
Use a `-e` flag to disable a specific error when running shellcheck:
$ shellcheck -e SC2059 myscript
### Ignoring one type of error forever
Set the `SHELLCHECK_OPTS` variable in your `.bashrc`, `/etc/profile` or equivalent:
export SHELLCHECK_OPTS="-e SC2059"