Skip to content

Decision on rubocop ClassLength #1985

@trichoplax

Description

@trichoplax

Currently, .rubocop.yml has the following setting:

Metrics/ClassLength:
  Max: 350

We already had exceptions to this for the classes PostsController and UsersController. A few months ago I added what I intended to be a temporary exception to this for CommentsController. I was expecting to remove it after a later pull request that would remove a method that is no longer needed. However, changes since then mean that even with that method removed the class is still over the length limit. I suspect that future changes to CommentsController will bring it back under the limit, but that still leaves 2 classes with exceptions to the rule.

How should we proceed?

  • Increase the limit?
  • Reduce the size of the classes that are over the limit?
  • Both (slightly increase the limit and reduce the classes to match it)?
  • Continue with the current limit and disable the rubocop check for some classes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions