vscode-shellcheck
vscode-shellcheck copied to clipboard
disable shellcheck for files with no extension?
Is this even possible?
It's probably doable through
According to this answer, something like the following should work:
"shellcheck.ignorePatterns": {
"[!.]": true,
"[!.][!.]": true,
"[!.][!.][!.]": true,
"[!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true,
"[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true
}
Make sense. I had this type of glob hack in my vscode settings for another purpose. I have all my scripts I need to run shellcheck on in a hidden folder so I wont be able to use this.
I decided to use shellcheck from the command line with an inclusive approach, offloading to find
the responsibility of what files to run. So like this:
alias lint-starter-scripts='find "$(pwd)/.gp" -type d \( -name node_modules -o -name vendor \) -prune -false -o -name "*.sh" -exec shellcheck -x -P "$(pwd)/.gp" {} \;'
Got it. I'll think about it and if this could be solved in another way. The best thing would be VS Code's globbing to support such scenarios.
PS: I could not think of anything yet.
According to this answer, something like the following should work:
"shellcheck.ignorePatterns": { "[!.]": true, "[!.][!.]": true, "[!.][!.][!.]": true, "[!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true, "[!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.][!.]": true }
просто охуеть! no comments
I believe this is a limitation of vscode's glob parser, not the extension's.