Module: Packwerk::OffensesFormatter

Extended by:
T::Helpers, T::Sig
Included in:
Formatters::DefaultOffensesFormatter
Defined in:
lib/packwerk/offenses_formatter.rb

Defined Under Namespace

Classes: DuplicateFormatterError

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



29
30
31
32
# File 'lib/packwerk/offenses_formatter.rb', line 29

def all
  load_defaults
  T.cast(offenses_formatters.map(&:new), T::Array[OffensesFormatter])
end

.find(identifier) ⇒ Object



35
36
37
# File 'lib/packwerk/offenses_formatter.rb', line 35

def find(identifier)
  formatter_by_identifier(identifier)
end

.included(base) ⇒ Object



24
25
26
# File 'lib/packwerk/offenses_formatter.rb', line 24

def included(base)
  offenses_formatters << base
end

Instance Method Details

#identifierObject



78
79
# File 'lib/packwerk/offenses_formatter.rb', line 78

def identifier
end

#show_offenses(offenses) ⇒ Object



70
71
# File 'lib/packwerk/offenses_formatter.rb', line 70

def show_offenses(offenses)
end

#show_stale_violations(offense_collection, for_files) ⇒ Object



74
75
# File 'lib/packwerk/offenses_formatter.rb', line 74

def show_stale_violations(offense_collection, for_files)
end

#show_strict_mode_violations(strict_mode_violations) ⇒ Object



82
83
# File 'lib/packwerk/offenses_formatter.rb', line 82

def show_strict_mode_violations(strict_mode_violations)
end