Class: Simplabs::Excellent::Checks::ClassLineCountCheck

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

Overview

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

Constant Summary collapse

DEFAULT_THRESHOLD =
400

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 = {}) ⇒ ClassLineCountCheck

:nodoc:



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

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