Class: Simplabs::Excellent::Checks::ModuleLineCountCheck
- Inherits:
-
LineCountCheck
- Object
- Base
- LineCountCheck
- Simplabs::Excellent::Checks::ModuleLineCountCheck
- 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
-
#initialize(options = {}) ⇒ ModuleLineCountCheck
constructor
:nodoc:.
Methods inherited from LineCountCheck
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( = {}) #:nodoc: threshold = [:threshold] || DEFAULT_THRESHOLD super([:module], threshold) end |