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

Metrics/AbcSize cop for define_method #4633

Closed
AlexWayfer opened this issue Jul 29, 2017 · 0 comments
Closed

Metrics/AbcSize cop for define_method #4633

AlexWayfer opened this issue Jul 29, 2017 · 0 comments
Assignees

Comments

@AlexWayfer
Copy link
Contributor

Expected behavior

Metrics/AbcSize cop works for define_method content.

Actual behavior

Metrics/AbcSize cop doesn't work for define_method content.

Steps to reproduce the problem

Write define_method with block where ABC-size is more than 15.

RuboCop version

$ rubocop -V
0.49.1 (using Parser 2.4.0.0, running on ruby 2.4.1 x86_64-linux)
@pocke pocke self-assigned this Nov 12, 2017
pocke added a commit to pocke/rubocop that referenced this issue Nov 13, 2017
Problem
=======

`AbcSize`, `CyclomaticComplexity` and `PerceivedComplexity` cops ignore `define_method`.

Solution
====

Update `MethodComplexity` mix-in.
This change makes these cops aware of `define_method`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants