Class: DangerPackwerk::PackwerkWrapper::OffensesAggregatorFormatter
- Inherits:
-
Object
- Object
- DangerPackwerk::PackwerkWrapper::OffensesAggregatorFormatter
- 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
-
#aggregated_offenses ⇒ Object
readonly
Returns the value of attribute aggregated_offenses.
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize ⇒ OffensesAggregatorFormatter
constructor
A new instance of OffensesAggregatorFormatter.
- #show_offenses(offenses) ⇒ Object
- #show_stale_violations(offense_collection, for_files) ⇒ Object
- #show_strict_mode_violations(strict_mode_violations) ⇒ Object
Constructor Details
#initialize ⇒ OffensesAggregatorFormatter
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_offenses ⇒ Object (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
#identifier ⇒ Object
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 |