Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.79 KB

README.md

File metadata and controls

62 lines (40 loc) · 1.79 KB

RuboCop Changed

Reduce RuboCop's CI time.

RuboCop extensions for lint only changed files in CI.

Git is required to work and assumes that the .git folder exists.

Installation

Add gem to your Gemfile

gem 'rubocop-changed'

Usage

RuboCop configuration file

Add to your .rubocop_for_ci.yml (for use only on CI):

require: rubocop-changed

Or add argument:

rubocop --require rubocop-changed

Additionally

The default branch for comparing gets by:

git remote show origin | sed -n '/HEAD branch/s/.*: //p' | xargs # usually it's main or master

For custom branch set env: RUBOCOP_CHANGED_BRANCH_NAME

Thanks

Similar Gems

The difference is the current extension didn't try to wrap RuboCop. Instead, it just patched a small part of the code, which allows you to use $ rubocop as before.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dukaev/rubocop-changed. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Rubocop::Changed project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.