On 23 May 2019, at 11:15, Stefan Daschek <stefan@daschek.net> wrote:The Ruby bundle currently supports reformatting a file with RuboCop (“Reformat Document”), and checking the document’s syntax using `ruby -wc.
So far there is no support for automatically checking (or maybe even reformatting) a file everytime it is saved.
For RuboCop, there are (at least) four stand-alone RuboCop bundles providing additional features:
* https://github.com/fazibear/Rubocop.tmbundle
* https://github.com/mrdougal/textmate2-rubocop
* https://github.com/goyox86/rubocop-tmbundle
* https://github.com/noniq/RuboCop.tmbundle (Disclaimer: This bundle was written by me).
Recently various alternatives to RuboCop emerged, especially:
* https://github.com/testdouble/standard (uses RuboCop internally, “No configuration“)
* https://github.com/samphippen/rubyfmt (autoformatting only, optimized for speed)
Both tools are still pre-1.0, but actively developed.
I’d like to add support for both standardrb and rubyfmt to TextMate. However, I’m not yet sure about the following questions:
* Should the Ruby bundle be extended to support these? Or should one or more stand-alone bundles be created?
* What would be the best way to tell TextMate which (if any) linting / formatting tool it should use for a given ruby file or project?