New issue
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 complains about hook script #1226
Comments
Hey @TrevorBurnham, thanks for raising this issue! Actually, the problem here is that the VS Code extension is spawning I do realize that this might be confusing for devs who have the VS Code extension installed, but I feel like it's simply wrong to disable the check here. That being said, your report inspired me to go through all shell scripts in this repo and fix the reported issues by |
Thanks for getting back to me! I've raised the issue with the vscode-shellcheck folks: vscode-shellcheck/vscode-shellcheck#883 |
Nice, thank you! |
Troubleshoot
https://typicode.github.io/husky/#/?id=troubleshoot
Context
(This is a minor issue: Functionality isn't affected.)
Scripts generated by
husky add
contain the line:Shellcheck, the popular shell script linter, doesn't care for that line. It complains:
The rule in question, SC1091, is complaining about Shellcheck not being able to access the referenced file. I can't think of a way to satisfy the rule, so it may be that the best solution is to have
husky add
emit ashellcheck disable
directive above it:Of course, another solution would be for developers to simply ignore the warning, but I believe it's very common for devs who use VS Code to have the Shellcheck extension installed (it has 500,000+ downloads) and enabled by default, so an extra line to silence the warning might avoid some confusion. Or maybe there's a more Shellcheck-friendly way to run
husky.sh
.The text was updated successfully, but these errors were encountered: