A set of custom cops to use on AI-generated code.
I have a preferred style of Ruby whether I'm vibe coding or not, so this library is meant to handle the easy formatting scenarios that I often find myself manually correcting. I plan to add to this over time anytime AI-generated code isn't to my preference.
And if it's not obvious, I am almost vibe coding this library, since I do skim the changes, review the test scenarios, and test it on personal projects.
Installation
Just install the rubocop-vibe library.
$ gem install rubocop-vibeOr, if you use Bundler, put this in your Gemfile.
gem "rubocop-vibe", require: falseUsage
You need to tell RuboCop to load the extension:
RuboCop configuration file
Put this into your .rubocop.yml.
plugins: rubocop-vibeAlternatively, use the following array notation when specifying multiple extensions.
plugins:
- rubocop-other-extension
- rubocop-vibeNow you can run rubocop and it will automatically load the cops together with
the standard cops.
The Cops
All cops are located under lib/rubocop/cop/vibe and
contain examples/documentation.
In your .rubocop.yml, you may treat the cops just like any other cop. For
example:
Vibe/ClassOrganization:
Exclude:
- lib/example.rbLicense
rubocop-vibe uses the MIT license. See LICENSE for more details.