I would like to run rubocop on the terminal only for the lines that I have modified within a git versioned project. Currently, from googling, I see scripts which work on the entire modified file.
I found this but what I understand from the documentation is that it shows false positives and negatives.
Pronto is gem that can do that - install pronto
and pronto-rubocop
.
If you want you can use this gist https://gist.github.com/alkuzad/dd729aca36a810892772 that I've used a lot before I was using pronto (it's still handy because pronto is not so flexible about diff). You have to install showlinenum from https://github.com/jay/showlinenum to ~/bin to get it work (or just modify the path in gist)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With