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 a false positive for Style/ColonMethodCall #5602

Merged

Conversation

koic
Copy link
Member

@koic koic commented Feb 25, 2018

Summary

AFAIK, It is customary to continue with :: after Java used in Java package namespace in JRuby.
e.g. Java::com (https://github.com/jruby/jruby/wiki/JDBC)

If it use a class method, I think . is good after Java, but it is maybe a rare case. In this PR, it prioritize that false positives don't occur in customary usage.

Other Information

I have learned about this false positive by the following address.
rsim/oracle-enhanced#1658.


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 rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

## Summary

AFAIK, It is customary to continue with `::` after `Java` used in
Java package namespace in JRuby.
e.g. `Java::com` (https://github.com/jruby/jruby/wiki/JDBC)

If it use a class method, I think `.` is good after `Java`, but it is
maybe a rare case. In this PR, it prioritize that false positives don't
occur in customary usage.

## Other Information

I have learned about this false positive by the following address.
rsim/oracle-enhanced#1658.
@bbatsov bbatsov merged commit c481137 into rubocop:master Feb 26, 2018
@koic koic deleted the fix_false_positive_for_style_colon_method_call branch February 26, 2018 02:10
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Apr 14, 2018
rubocop/rubocop#5602 addressed
`Style/ColonMethodCall` false positive
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Apr 14, 2018
yahonda added a commit to yahonda/oracle-enhanced that referenced this pull request Apr 15, 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.

2 participants