The --auto-correct and --auto-correct-all flags have been deprecated in
favor of --autocorrect and --autocorrect-all.
For the sake of backwards compatibility, we now use -a and -A which
remain unchanged since auto-correction support was first added to
Rubocop.
Fixes#8
Latest version of RuboCop now only performs auto-corrections from "safe"
cops when given the `--auto-correct`/`-a` option. To run
auto-corrections from all cops, including "unsafe" ones, you must now
pass in `--auto-correct-all`/`-A` instead.
The new `rubocopfmt-include-unsafe-cops` defcustom defaults to no `nil`,
for backwards compatibility. Turn on unsafe cops by setting it to `t`.
Add support for using `lsp-format-buffer` to format Ruby buffers instead
of `rubocopfmt` when `rubocopfmt-mode` and `lsp-mode` are both enabled.
Disabled by default, and must manually be enabled by setting
`rubocopfmt-on-save-use-lsp-format-buffer` to `t`.
I consider this feature EXPERIMENTAL, meaning it "works on my machine",
with no guarantees of it working elsewhere, nor if it will remain part
of rubocopfmt in the future.
For some projects I don't have bundler as part of the Gemfile but run it
as an external tool. With this kind of setup it would be nice to be able
to opt out of `bundle exec` even if you have a Gemfile and are using
bundler for the rest of the project.
It also enables rubocopfmt to work with the enh-ruby-mode out of the
box, in addition to the default ruby-mode it already supported. And
additional major modes can be added via:
M-x customize-group rubocopfmt
Fixes issue #2.
Large portions of rubocopfmt.el is based on code from go-mode.el. As
such rubocopfmt.el should really carry the same license and copyright
as go-mode.el does.
Having the rubocopfmt Ruby gem as an external dependency is becoming
tedious. So lets parse rubocop's output and perform the diffing
ourselves within Emacs.
This effectively marks the end of the rubocopfmt Ruby gem, as I no
longer need it, and will not maintain it moving forward.