Sha256: c61d93895c23948c076d3d53ccfd8b44b0859281df5c2bf7e6396ab1759e8ec8
Contents?: true
Size: 620 Bytes
Versions: 15
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Metrics # This cop checks if the length a class exceeds some maximum value. # Comment lines can optionally be ignored. # The maximum allowed length is configurable. class ClassLength < Cop include ClassishLength def on_class(node) check_code_length(node) end private def message(length, max_length) format('Class has too many lines. [%<length>d/%<max>d]', length: length, max: max_length) end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems