Sha256: 074d8e9225922eb4bd85fd19ea01ca45d48a67b9a237dcc18d446b876abba4e6
Contents?: true
Size: 849 Bytes
Versions: 12
Compression:
Stored size: 849 Bytes
Contents
require 'simplabs/excellent/checks/line_count_check' module Simplabs module Excellent module Checks # This check reports classes which have more lines than the threshold. Classes with a large number of lines are hard to read and understand and # often an indicator for badly designed code as well. # # ==== Applies to # # * classes class ClassLineCountCheck < LineCountCheck DEFAULT_THRESHOLD = 400 def initialize(options = {}) #:nodoc: threshold = options[:threshold] || DEFAULT_THRESHOLD super([:class], threshold) end protected def warning_args(context) #:nodoc: [context, '{{class}} has {{count}} lines.', { :class => context.full_name, :count => context.line_count }] end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems