We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shellcheck --version
#!/bin/zsh function foo() { cd generated_files return $? }
SC2164: suggested cd generated_files || exit
cd generated_files || exit
No suggestion. The function returns on the next line anyways.
The text was updated successfully, but these errors were encountered:
The warning is correct. Ignore it with a directive if you don't like it.
Sorry, something went wrong.
If cd fails, it will return on the next line anyways.
cd
this doesn't make sense:
cd generated_files || return $? return $?
Isn't this like?
int result = cd("generated_files"); if (result == 1) return result; return result;
|| return when the next line already is return seems redundant to me.
|| return
No branches or pull requests
For bugs
shellcheck --version
or "online"): onlineHere's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
SC2164: suggested
cd generated_files || exit
Here's what I wanted or expected to see:
No suggestion. The function returns on the next line anyways.
The text was updated successfully, but these errors were encountered: