Skip to content

Conversation

@gsamokovarov
Copy link
Member

This is so we maintain our own fork. We can just use master rather than dealing with custom branches.
I need this, so I don't need to manually patch rubocop-git with bundle open rubocop-git every time I update a gem.

NickLaMuro and others added 7 commits October 26, 2016 22:20
The TargetRubyVersion config in ruby has gone some heavy overhaul since
it was first introduced in rubocop 0.36.0, and now there is a
target_ruby_version method available directly from the RuboCop::Config
class as of 0.41.0.

This makes implementation added here redundant for newer versions of
RuboCop, and also causes the tests to fail when resolving the
TargetRubyVersion through it.  It shall be used for rubocop versions
less than 0.41.0 until those are not supported, but on anything greater
than that, we shall call out to the RuboCop::Config API directly for
resolution of that (it will use RuboCop::Config::DEFAULT_RUBY_VERSION if
it is not able to determine one, avoiding errors).
In rubocop 0.47.0, the `RuboCop::Cop::Registry` was added as the new way
of handling passing around a collection of Cops to other portions of the
code base.  See rubocop/rubocop#3837

This change, as a result, made it so that initializing
`RuboCop::Cop::Team` required you passing in a `Registry`, and not an
Array of cops (which was previously supported`.

Because this change is not backwards compatible, we need to support two
ways of intializing the `RuboCop::Cop::Team`:

1. By passing it an array of cops:  `RuboCop::Cop::Cop.all`
2. By passing it a registry of cops:  `RuboCop::Cop::Registry.new cops`

And this is dependent on the version, so the `all_cops` methods will be
conditionally created based on the VERSION of rubocop that supports
either call.
…x-to-default

Reset git diff settings for color and mnemonicprefix to default
@gsamokovarov gsamokovarov merged commit abe185f into master Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants