Closed schinckel closed 8 years ago
I've erred on the side of caution, and included the shellcheck binary, and all of the files that were installed by brew install shellcheck
Nice work, thanks!
That said, I’m not sure how I feel about that binary.
As for the other files:
@sorbits @infininight Any advice regarding the binary? @schinckel I think this integration would make a great standalone bundle, how do you feel about that?
Yeah, a standalone bundle could be best.
One other alternative is to use an environment variable for the command location (it's brew-installable). However, having a single install process would be simpler.
One other alternative is to use an environment variable for the command location (it's brew-installable).
Right, that way we could leave this command in the bundle and leave installation to the user.
The C bundle provides a nice example for this (see the requiredCommands
key in ~/Library/Application\ Support/TextMate/Managed/Bundles/C.tmbundle/Commands/Reformat\ Document.tmCommand
).
When doing that though I’d prefer this to be a “Validate Style” kind of command (the common shortcut for those is ⌃⇧V) so users don’t have to install GHC just to save shell scripts.
Which way do you prefer?
Using the requiredCommands
(without putting the binary in the bundle) and putting it on ⌃⇧V sounds like the best way.
You can include instructions about how to set it up to run on save.
And as for requiredCommands
this can be set to look in common install locations (like homebrew’s), so all the user need to do is run brew install shellcheck
.
@schinckel This feels like something that https://github.com/sxtxixtxcxh/validate-on-save.tmbundle may be interested in?
This change seems to have found its way into https://github.com/sxtxixtxcxh/validate-on-save.tmbundle. Feel free to reopen if you want to discuss this further.
Marks the current file with warning/error/notes as applicable.
Includes documentation and binary.