Used the wiki template and added examples from #1979

Edward Knight
2020-06-11 18:42:11 +01:00
parent 56fe9781b4
commit cbe492cbb8

@@ -1 +1,20 @@
See [the Directive page](Directive) about how to properly [format a shellcheck directive](Directive#documenting-directive-use). ## Invalid key=value pair in directive
### Problematic code:
```sh
# shellcheck disable=SC2153 (variable not a misspelling)
```
### Correct code:
```sh
# shellcheck disable=SC2153 # variable not a misspelling
```
### Rationale:
A comment at the end of a directive must be preceded by a `#`
to avoid it being interpreted as an instruction.
The [directive page](Directive#documenting-directive-use)
contains more guidance about commenting style.