V=’–verbose=”true”‘ cmd $v # Literal quotes in variablesįor f in “*.ogg” # Incorrectly quoted ‘for’ loops Rm “~/my file.txt” # Quoted tilde expansion name *.ogg # Unquoted find/grep patterns ShellCheck can recognize several types of incorrect quoting:įind. So what kind of things does ShellCheck look for? Here is an incomplete list of detected issues. To point out subtle caveats, corner cases and pitfalls that may cause an advanced user’s otherwise working script to fail under future circumstances.To point out and clarify typical intermediate level semantic problems that cause a shell to behave strangely and counter-intuitively.To point out and clarify typical beginner’s syntax issues that cause a shell to give cryptic error messages.ShellCheck is a static analysis tool for shell scripts. Looking for tips and tricks, or have one to share? Check out Contrib! If you would like to contribute and create a page, just copy the Template and give it a name like SC1000, and bask in unending appreciation from shell scripters world wide!Īre you a robot or web crawler? See for a list of all available search engine indexable copies of pages of the GitHub Wiki. On, you can just click the error code to go to this page. ^- SC1118: Delete whitespace after the here-doc end token.Īnd it's too terse or you're not sure whether it applies, you can read more on this wiki page: SC1118. If you get this output: $ shellcheck myscript This wiki holds all the long form descriptions of warnings and suggestions it outputs. You can file an issue about it and ask that it be added. If you tried to follow a link for an issue but ended up here, it means that page does not exist yet :( ShellCheck: Home – Welcome to the ShellCheck wiki! Home – ShellCheck Wiki See this page on GitHub
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |