Declaring bash functions using the function
keyword, with function body in parens
#2651
Open
2 tasks done
function
keyword, with function body in parens
#2651
For bugs
SC1073, SC1065, SC1064, SC1072
shellcheck --version
or "online"):0.9.0
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Either nothing, or if shellcheck strongly prefers that the function be defined as
foo() ( pwd )
(it doesn't complain about that at all) it should say so.Having the function body in parens instead of braces is kosher, it just means that the function body is executed in a sub-shell.
The text was updated successfully, but these errors were encountered: