Open jandubois opened 4 years ago
I thought both rules were already part of our coding style, but they are not enforced by our shellcheck config:
name: quote-safe-variables desc: Suggest quoting variables without metacharacters example: var=hello; echo $var fix: var=hello; echo "$var" name: require-variable-braces desc: Suggest putting braces around all variable references example: var=hello; echo $var fix: var=hello; echo ${var}
@mook-as agreed that we should enable them.
Describe the solution you'd like
This simply requires enabling both options from the commandline:
shellcheck --enable quote-safe-variables --enable require-variable-braces ...
The bigger work will be bringing all the files in the repo in compliance with these rules. 😄
+1 Anything missing from this guide? https://google.github.io/styleguide/shellguide.html
Would also like to understand what the github superlinter brings to the table here.
I thought both rules were already part of our coding style, but they are not enforced by our shellcheck config:
@mook-as agreed that we should enable them.
Describe the solution you'd like
This simply requires enabling both options from the commandline:
The bigger work will be bringing all the files in the repo in compliance with these rules. 😄