Skip to content

Configure Metrics/BlockLength with sensible Rails defaults #85

@jgarber623-cargosense

Description

@jgarber623-cargosense

I've found a handful of blocks that are necessarily long and not easily avoidable:

  • Rails.application.configure
  • Rails.routes.draw (and namespace within the routes file)
  • reversible in database migrations
  • task in a *.rake file

It's not terribly helpful to have RuboCop shout about those, so I'm proposing we add the following to our default metrics configuration here to avoid the noise:

Metrics/BlockLength:
  AllowedMethods:
    - configure
    - draw
    - namespace
    - reversible
    - task

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions