![]() i CODE1, -include= CODE1Įxplicitly include only the specified codes in the report. color without an argument is equivalent to -color=always. C, -colorįor TTY output, enable colors always, never or auto. With this option, any issues in sourced files will also be reported. Normally, shellcheck will only warn about issues in the specified files. For scripts starting with #!/bin/ksh (or using -s ksh), ShellCheck will not warn at all, as ksh supports decimals in arithmetic contexts.Įmit warnings in sourced files.For scripts starting with #!/bin/bash (or using -s bash), ShellCheck will warn that decimals are not supported.)) is not POSIX compliant (similar to checkbashisms). For scripts starting with #!/bin/sh (or when using -s sh), ShellCheck will warn that ((.It's mainly focused on handling typical beginner and intermediate level syntax errors and pitfalls where the shell just gives a cryptic error message or strange behavior, but it also reports on a few more advanced issues where corner cases can cause delayed failures. ShellCheck is a static analysis and linting tool for sh/bash scripts. List all available optional checks that are disabled by default: shellcheck -list-optional.Enable one or more optional checks: shellcheck -enable= add-default-case|avoid-nullary-conditions.Display output in the specified format (defaults to tty): shellcheck -format tty|checkstyle|diff|gcc|json|json1|quiet path/to/script.sh.Also check any sourced shell scripts: shellcheck -checked-sourced path/to/script.sh.Ignore one or more error types: shellcheck -exclude SC1009,SC1073 path/to/script.sh.Check a shell script interpreting it as the specified shell dialect (overrides the shebang at the top of the script): shellcheck -shell sh|bash|dash|ksh path/to/script.sh.Check a shell script: shellcheck path/to/script.sh.Shell script analysis tool Examples (TL DR) ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |