![Forrest logo](/images/logo.png)
shellcheck:tldr:85bfb
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.