Forrest logo
back to the shellcheck tool

shellcheck:tldr:85bfb

shellcheck: List all available optional checks that are disabled by default.
$ shellcheck --list-optional
try on your machine

The command "shellcheck --list-optional" is used to display a list of optional ShellCheck rules.

ShellCheck is a static analysis tool for shell scripts. It automatically identifies and detects common errors, stylistic issues, and potential bugs in shell scripts. ShellCheck rules are categorized as either required or optional. Required rules indicate critical issues that should be fixed, while optional rules highlight potential improvements that may or may not be necessary.

The "shellcheck --list-optional" command specifically lists the optional rules available in ShellCheck. By executing this command, you can see the individual optional rules along with their rule IDs. These rules cover various aspects of shell script best practices and potential improvements, allowing you to gain insight into suggested enhancements for your scripts.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the shellcheck tool