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.



23
24
25
# File 'lib/hashira/smells/report.rb', line 23

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

Instance Method Details

#findingsObject



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

def findings = @findings ||= sniff(@types, JUDGES) + sniff(@types.flat_map(&:defs), PROBES)