Class: Simplabs::Excellent::Checks::ModuleLineCountCheck

Inherits:
LineCountCheck show all
Defined in:
lib/simplabs/excellent/checks/module_line_count_check.rb

Overview

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

Constant Summary collapse

DEFAULT_THRESHOLD =
300

Instance Attribute Summary

Attributes inherited from Base

#interesting_files, #interesting_nodes, #warnings

Instance Method Summary collapse

Methods inherited from LineCountCheck

#evaluate

Methods inherited from Base

#add_warning, #evaluate_node, #warnings_for

Constructor Details

#initialize(options = {}) ⇒ ModuleLineCountCheck

:nodoc:


19
20
21
22
# File 'lib/simplabs/excellent/checks/module_line_count_check.rb', line 19

def initialize(options = {}) #:nodoc:
  threshold = options[:threshold] || DEFAULT_THRESHOLD
  super([:module], threshold)
end