ruby-beautify icon indicating copy to clipboard operation
ruby-beautify copied to clipboard

Planning to rewrite around rubocop

Open erniebrodeur opened this issue 8 years ago • 1 comments

Hey Everybody,

Thought I would chime in and let everybody know that I'm planning on rewriting this to leverage the rubocop app, while still allowing for the same behavior currently in place.

This is going to take a bit and I haven't begun to investigate how to do this.

More information will be posted as I have time.

erniebrodeur avatar Apr 02 '17 03:04 erniebrodeur

You can accomplish the same thing with Rubocop by specifying only Layout cops, like this:

rubocop --only Layout <filename>

ruby-beautify can be completely replaced with Rubocop by simply using

rubocop --auto-correct --only Layout <filename>

which will auto correct using only the Layout cops, but won't make any of the opinionated style guide changes.

You can also pipe a file into rubocop and get it back through stdout.

cat <filename> | rubocop --stdin <filename> --auto-correct

(rubocop uses the second filename for what it should display in its output results, should be the same as the one passed to cat)

bbugh avatar Jul 25 '17 16:07 bbugh