Class: Hashira::Smells::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/smells/report.rb

Constant Summary collapse

CHECKS =
Hashira::Smells::Check.subclasses.sort_by(&:name).freeze
JUDGES =
CHECKS.select(&:judge?).freeze
PROBES =
CHECKS.reject(&:judge?).freeze

Instance Method Summary collapse

Constructor Details

#initialize(project, trees) ⇒ Report

Returns a new instance of Report.



26
27
28
29
# File 'lib/hashira/smells/report.rb', line 26

def initialize(project, trees)
  @census = Hashira::Smells::Census.new(project, trees)
  @types = @census.types
end

Instance Method Details

#findingsObject



31
# File 'lib/hashira/smells/report.rb', line 31

def findings = @findings ||= sniff(@types, JUDGES) + sniff(methods, PROBES) + sprawl