Sha256: e6d45deaea358ccebd975b2cdc52c44148b027a5ecfbce1956a050c2a7f98f19

Contents?: true

Size: 552 Bytes

Versions: 8

Compression:

Stored size: 552 Bytes

Contents

# encoding: utf-8

module RuboCop
  module Cop
    module Metrics
      # This cop checks if the length a module exceeds some maximum value.
      # Comment lines can optionally be ignored.
      # The maximum allowed length is configurable.
      class ModuleLength < Cop
        include ClassishLength

        def on_module(node)
          check_code_length(node)
        end

        private

        def message(length, max_length)
          format('Module has too many lines. [%d/%d]', length, max_length)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rubocop-0.35.1 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.35.0 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.34.2 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.34.1 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.34.0 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.33.0 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.32.1 lib/rubocop/cop/metrics/module_length.rb
rubocop-0.32.0 lib/rubocop/cop/metrics/module_length.rb