Class: DangerPackwerk::PackwerkWrapper::OffensesAggregatorFormatter

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Packwerk::OffensesFormatter
Defined in:
lib/danger-packwerk/packwerk_wrapper.rb

Overview

This Packwerk formatter simply collects offenses. Ideally we could accomplish this by calling into public API of the CLI, but right now this is the only way to get the raw offenses out of packwerk.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOffensesAggregatorFormatter

Returns a new instance of OffensesAggregatorFormatter.



49
50
51
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 49

def initialize
  @aggregated_offenses = T.let([], T::Array[Packwerk::ReferenceOffense])
end

Instance Attribute Details

#aggregated_offensesObject (readonly)

Returns the value of attribute aggregated_offenses.



46
47
48
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 46

def aggregated_offenses
  @aggregated_offenses
end

Instance Method Details

#identifierObject



70
71
72
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 70

def identifier
  'danger_packwerk_offenses_aggregator'
end

#show_offenses(offenses) ⇒ Object



54
55
56
57
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 54

def show_offenses(offenses)
  @aggregated_offenses = T.unsafe(offenses)
  ''
end

#show_stale_violations(offense_collection, for_files) ⇒ Object



60
61
62
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 60

def show_stale_violations(offense_collection, for_files)
  ''
end

#show_strict_mode_violations(strict_mode_violations) ⇒ Object



65
66
67
# File 'lib/danger-packwerk/packwerk_wrapper.rb', line 65

def show_strict_mode_violations(strict_mode_violations)
  ''
end