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

Disable Length checks #46

Closed
wants to merge 1 commit into from
Closed

Disable Length checks #46

wants to merge 1 commit into from

Conversation

gdiggs
Copy link
Contributor

@gdiggs gdiggs commented Oct 25, 2016

We never follow them, and always have to merge around them

@codeclimate/review

We never follow them, and always have to merge around them
@wfleming
Copy link
Contributor

I think always is an overly strong statement: I can think of many times we've taken the time to refactor due to long method issues: normally when we ignore them it's because the method is a giant hash of attrs to get passed elsewhere.

Personally, I also think the long class issues are helpful as a warning of "hey, this class might be getting out of hand.".

Enabled: false

Metrics/MethodLength:
Enabled: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this one is useful? I think I've refactored in some cases when a CC found a method length issue.

I agree there are certain methods we are always fine having long - e.g. with a hash or a run method - but we can disable rubocop on the method inline in those cases.

WDYT?

@pbrisbin
Copy link
Contributor

I (basically) agree with @wfleming. Yes there are false-positives that we often merge around (mostly because of the Hash-happiness of Mongo), but I like seeing the issues come up and choosing when/if to do that. I also like seeing when a class gets "Long" and deciding to deal with it now or defer (but not ignore the issue).

@maxjacobson
Copy link
Contributor

We should make gates 😄

@gdiggs
Copy link
Contributor Author

gdiggs commented Oct 25, 2016

This went about as I expected! Closing.

@gdiggs gdiggs closed this Oct 25, 2016
@gdiggs gdiggs deleted the gd-length branch October 25, 2016 22:16
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.

5 participants