Updated SC2148 (markdown)

koalaman
2014-11-01 14:04:10 -07:00
parent 62e0f74a81
commit a92bfa6e87

@@ -1,4 +1,4 @@
## Include a shebang (#!) to specify the shell.
## Shebang (#!) missing. Assuming Bash.
### Problematic code:
@@ -11,12 +11,10 @@
### Rationale:
ShellCheck noticed that your file does not start with a shebang. Shebangs are good for a number of reasons:
ShellCheck warns about different things for different shells. It uses the shebang to determine which shell to warn for. For the command line client, this can be overridden with `-s`, e.g. `shellcheck -s sh file`.
* They allow scripts to be executed outside of interactive prompts.
* They ensure the script is executed by the correct shell.
* Editors and utilities (including shellcheck) use it to determine the file type.
If you don't specify the shell type in any way, ShellCheck assumes a default and gives this message.
### Contraindications
For checking snippets, use `shellcheck -e 2148`. This is the default for [shellcheck.net](http://www.shellcheck.net).
None. Just specify the shell type, either in a shebang or as a cli flag.