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 #6972] Fix a false positive for Style/MixinUsage #7000

Merged

Conversation

koic
Copy link
Member

@koic koic commented Apr 29, 2019

Fixes #6972

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


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.

Copy link
Collaborator

@Drenmi Drenmi left a comment

Choose a reason for hiding this comment

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

🚀

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 30, 2019

Looks good to me, but I know @Darhazer was also working on this, so let's wait for his feedback.

Fixes rubocop#6972

This PR fixes a false positive for `Style/MixinUsage` when using
inside block and `if` condition is after `include`.
@koic koic force-pushed the fix_false_positive_for_style_mixin_usage branch from 1763913 to 11b87ca Compare April 30, 2019 06:47
@Darhazer Darhazer merged commit ce27c89 into rubocop:master Apr 30, 2019
@koic koic deleted the fix_false_positive_for_style_mixin_usage branch April 30, 2019 07:43
koic added a commit to koic/rubocop that referenced this pull request Jul 3, 2019
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 pushed a commit that referenced this pull request 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.
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.

False Failure: Style/MixinUsage: include is used at the top level. Use inside class or module.
4 participants