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

[Fix #7186] Fix a false positive for Style/MixinUsage #7194

Merged

Conversation

koic
Copy link
Member

@koic koic commented Jul 3, 2019

Fixes #7186.

This PR fixes a false positive for Style/MixinUsage when using inside multiline block and if condition is after include.

And this PR is a additional patch of #7000.


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.

Fixes rubocop#7186.

This PR fixes a false positive for `Style/MixinUsage` when using inside
multiline block and `if` condition is after `include`.

And this PR is a additional patch of rubocop#7000.
@bbatsov bbatsov merged commit ffeccd6 into rubocop:master Jul 3, 2019
@bbatsov
Copy link
Collaborator

bbatsov commented Jul 3, 2019

Thanks!

@koic koic deleted the fix_a_false_positive_for_style_mixin_usage branch July 3, 2019 07:56
koic added a commit to koic/rubocop that referenced this pull request Sep 29, 2019
…ccessModifier`

Fixes rubocop#7212.
Fixes rubocop#7246.

This PR fixes a false positive for `Layout/EmptyLinesAroundAccessModifier` and
`UselessAccessModifier` when using method with the same name as access modifier
around a method definition.

The main changes are as follows.

- Added test for where rubocop#7194 change did not find a regression.
- The implementation needed to resolve rubocop#7186 will be moved to `Style/MixinUsage` cop.
This solves false positives that occurred in other cops.
bbatsov pushed a commit that referenced this pull request Sep 30, 2019
…difier`

Fixes #7212.
Fixes #7246.

This PR fixes a false positive for `Layout/EmptyLinesAroundAccessModifier` and
`UselessAccessModifier` when using method with the same name as access modifier
around a method definition.

The main changes are as follows.

- Added test for where #7194 change did not find a regression.
- The implementation needed to resolve #7186 will be moved to `Style/MixinUsage` cop.
This solves false positives that occurred in other cops.
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.

Style/MixinUsage behaves inconsistently for guard clause
2 participants