mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
dcoumenting ignoring all instances in a file
@@ -22,3 +22,11 @@ Use a `-e` flag to disable a specific error when running shellcheck:
|
||||
Set the `SHELLCHECK_OPTS` variable in your `.bashrc`, `/etc/profile` or equivalent:
|
||||
|
||||
export SHELLCHECK_OPTS="-e SC2059"
|
||||
|
||||
### Ignoring all instances in a file (0.4.4+)
|
||||
Add a [[directive]] at the top of the file:
|
||||
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2059`
|
||||
|
||||
Note that the [[directive]] must be on the first line after the shebang ([#779](https://github.com/koalaman/shellcheck/issues/779)). That will be fixed in 0.4.6+
|
Reference in New Issue
Block a user