add another possible cause of error

Lucas Larson
2024-07-13 11:30:55 -04:00
parent 17b802cc16
commit 28dafe655d

@@ -3,3 +3,19 @@
*Note: There is a [known bug](../issues/1036) in the current version when [directives](../wiki/Directive) appear within `then` clauses of `if` blocks that causes Shellcheck to report SC1072 on otherwise valid code. Avoid using directives within `then` clauses - instead place them at the top of the `if` block or another enclosing block. This is fixed on the [online version](https://www.shellcheck.net/) and the next release.*
See [Parser Error](https://github.com/koalaman/shellcheck/wiki/Parser-Error).
This error can also occur with an [incomplete shellcheck directive](https://github.com/koalaman/shellcheck/wiki/Ignore/ceb874a8defc0df77b285e4fc54f897ed9dbb231#ignoring-all-errors-in-a-file-08) like `# shellcheck disable` instead of `# shellcheck disable=all`
### Problematic code
```sh
# shellcheck disable
echo stuff that shellcheck up to at least v0.10.0 will not even see because of the incorrect directive above
```
### Correct code
```sh
# shellcheck disable=all
echo stuff that shellcheck will correctly ignore entirely
```
###