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