Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RuboCop task in Rakefile #928

Closed
wants to merge 1 commit into from

Conversation

gemmaro
Copy link
Contributor

@gemmaro gemmaro commented Oct 4, 2022

If the RuboCop version is 1.31 or later then use rubocop:autocorrect task instead of deprecated rubocop:auto_correct
in the Rakefile. Otherwise use the conventional rubocop:auto_correct task.

See also: RuboCop changelog > 1.31.0 (2022-06-27) - Changes > rubocop/rubocop#10709

If the RuboCop version is 1.31 or later then use
`rubocop:autocorrect` task instead of deprecated `rubocop:auto_correct`
in the `Rakefile`.
Otherwise use the conventional `rubocop:auto_correct` task.

Note that the older RuboCop doesn't have
`RuboCop::Version` module, so the condition
`RuboCop.const_defined?(:Version)` is necessary.
@gemmaro gemmaro marked this pull request as ready for review October 4, 2022 14:36
@nobu nobu mentioned this pull request Nov 27, 2022
@nobu nobu closed this in #946 Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant