bats-core / bats-vscode

BATS (Bash Automated Testing System) language support for VSCode.
MIT License
23 stars 7 forks source link

Cooperate with ShellCheck extension #19

Open KlfJoat opened 7 months ago

KlfJoat commented 7 months ago

Hi. I really appreciate this extension and how much easier it makes Bats test writing. Thank you so much for creating and maintaining it!

I use another VSC extension, timonwong.shellcheck, to lint my Bash code with ShellCheck. Both ShellCheck and that extension support linting Bats files.

However, the ShellCheck extension only lints files that have the "ShellScript" language identifier. And your wonderful extension creates a new configured language identifier, "Bats (Bash Automated Testing System)". So timonwong.shellcheck won't run on Bats files while your extension is enabled.

When I want to lint my Bats files, I disable your extension, manually set the individual file as a ShellScript, then fix issues. I have 45 Bats files in this project so far, and it's barely an eighth completed.

I opened an issue for this with them, thinking a fix was on their side. But they pointed out that they have an API for other extensions to interface with. https://github.com/vscode-shellcheck/vscode-shellcheck/blob/master/doc%2FAPI.md

It seems like the way for Bats language support to be enabled and linted by ShellCheck is if you could please hook into their API. I'd help if I could, but I tend to write bash scripts, not javascript extensions so I'm not sure how much help I could be beyond beta testing.

Thanks!

jetmartin commented 7 months ago

Hi,

Thank you for your great feedback and proposed enhancement ! What you said make sens. With all the detail you already gave to me, I gonna look at it for sure.

Please note that maintenance and contribution are made on my personal time off, so do not expect to high reactivity.

KlfJoat commented 7 months ago

Please note that maintenance and contribution are made on my personal time off, so do not expect to high reactivity.

I understand. I appreciate your willingness to consider this enhancement.

Again, please let me know if I can assist in any way. Thanks!