mirror of https://github.com/CrimsonTome/tldr.git
20 lines
336 B
Markdown
20 lines
336 B
Markdown
# shellcheck
|
|
|
|
> Shell script static analysis tool.
|
|
|
|
- Check a shell script:
|
|
|
|
`shellcheck {{file.sh}}`
|
|
|
|
- Override script's shebang:
|
|
|
|
`shellcheck --shell {{sh|bash|ksh}} {{file.sh}}`
|
|
|
|
- Ignore certain errors:
|
|
|
|
`shellcheck --exclude {{SC1009}} {{file.sh}}`
|
|
|
|
- Ignore multiple errors:
|
|
|
|
`shellcheck --exclude {{SC1009,SC1073}} {{file.sh}}`
|