Settings

Theme

Using Bash to Automate Rubocop Fixes

krmannix.com

20 points by kevinmannix 6 years ago · 3 comments

Reader

saghm 6 years ago

Naive question: given that this is obviously being done on a system with Ruby, why not just write the script in Ruby instead of bash?

  • znep 6 years ago

    rubocop is so over the top in pendantics that writing any ruby code that gets nit picked by it is so painful that it makes more sense to just switch languages.

    • saghm 6 years ago

      Couldn't the script just not have rubocopy run on it? I'm mainly wondering because although I don't primarily code in Ruby anymore, it's still my go-to choice for when I need to write a script. My personal rule is that I switch from bash to a general-purpose scripting language as soon as I need either control flow or string manipulation.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection