For those like me that often forget to run rubocop against the diff code, I added a pre-commit git hook to do this.
-
Goes to your repository folder
$ cd yourrepo/. -
Add the pre-commit executable file to your
.git/hooksfolder. -
Be happy, you will never more be alerted by your CI about rubocop complaints.