Sha256: 6b48f5bd65a04bd3d165dd74f9dee127aceed68c6807ea8de3c8c7eff4787144
Contents?: true
Size: 868 Bytes
Versions: 1
Compression:
Stored size: 868 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([Parsing::ModuleContext], 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
excellent-1.6.0 | lib/simplabs/excellent/checks/module_line_count_check.rb |