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

Move FlipFlop cop from Style to Lint department #6636

Merged

Conversation

koic
Copy link
Member

@koic koic commented Jan 8, 2019

Follow up of #6635 (comment).

flip-flop operator is deprecated since Ruby 2.6.0.

The flip-flop syntax is deprecated. [Feature #5400]

This PR moves FlipFlop cop from Style department to Lint department.


Before submitting the PR make sure the following are checked:

  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Follow up of rubocop#6635 (comment).

flip-flop operator is deprecated since Ruby 2.6.0.

> The flip-flop syntax is deprecated. [Feature rubocop#5400]

- https://github.com/ruby/ruby/blob/v2_6_0/NEWS#language-changes
- https://bugs.ruby-lang.org/issues/5400

This PR moves `FlipFlop` cop from `Style` department to `Lint` department.
Description: 'Checks for flip-flops'
StyleGuide: '#no-flip-flops'
Enabled: true
VersionAdded: '0.16'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbatsov Is it necessary to add VersionChanged metadata when moving a department? I have not added VersionChanged: '0.63' because there is no behavior change of this cop.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's fine.

@bbatsov bbatsov merged commit 8c52ab6 into rubocop:master Jan 11, 2019
@koic koic deleted the move_flip_flop_from_style_to_lint_department branch January 11, 2019 09:27
danielmorrison added a commit to danielmorrison/standard that referenced this pull request Jan 22, 2019
Rubocop 0.63.0 moved Style/FlipFlop to Lint/FlipFlop (rubocop/rubocop#6636)
which generates a warning “…config/base.yml: Style/FlipFlop has the wrong namespace - should be Lint” when standard is run.

This updates the base config and locks rubocop to >= 0.63.
y-yagi added a commit to y-yagi/rubocop-github that referenced this pull request Jan 27, 2019
Rubocop 0.63.0 moved Style/FlipFlop to Lint/FlipFlop.
Ref: rubocop/rubocop#6636

This updates the config and locks rubocop to ~> 0.63.
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.

None yet

2 participants