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 Metric/BlockLength cop #243

Merged
merged 1 commit into from Oct 17, 2016

Conversation

alexjfisher
Copy link
Member

Metric/BlockLength is a new cop in rubocop 0.44.
rubocop/rubocop#3566

All puppet type definitions occur in blocks that are almost always
longer than 25 lines. I don't see much benefit in having the cop
enabled, and then having to disable it with control comments instead.

`Metric/BlockLength` is a new cop in rubocop 0.44.
rubocop/rubocop#3566

All puppet type definitions occur in blocks that are almost always
longer than 25 lines.  I don't see much benefit in having the cop
enabled, and then having to disable it with control comments instead.

Signed-off-by: Alexander Fisher <alex@linfratech.co.uk>
@alexjfisher
Copy link
Member Author

As an example, puppet-archive build currently fails like this...

lib/puppet/provider/archive/wget.rb:1:1: C: Metrics/BlockLength: Block has too many lines. [32/25]
Puppet::Type.type(:archive).provide(:wget, parent: :ruby) do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/puppet/provider/archive/curl.rb:1:1: C: Metrics/BlockLength: Block has too many lines. [34/25]
Puppet::Type.type(:archive).provide(:curl, parent: :ruby) do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/puppet/provider/archive/ruby.rb:15:1: C: Metrics/BlockLength: Block has too many lines. [140/25]
Puppet::Type.type(:archive).provide(:ruby) do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/puppet/type/archive.rb:6:1: C: Metrics/BlockLength: Block has too many lines. [214/25]
Puppet::Type.newtype(:archive) do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/puppet/type/archive.rb:9:3: C: Metrics/BlockLength: Block has too many lines. [33/25]
  ensurable do ...
  ^^^^^^^^^^^^

@bastelfreak bastelfreak merged commit 75955be into voxpupuli:master Oct 17, 2016
@bastelfreak bastelfreak changed the title RFC: Disable Metric/BlockLength cop Disable Metric/BlockLength cop Oct 17, 2016
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.

None yet

2 participants