lib/packwerk/formatters/offenses_formatter.rb in packwerk-1.1.3 vs lib/packwerk/formatters/offenses_formatter.rb in packwerk-1.2.0
- old
+ new
@@ -1,25 +1,20 @@
# typed: strict
# frozen_string_literal: true
-require "benchmark"
-require "sorbet-runtime"
-
-require "packwerk/inflector"
-require "packwerk/output_style"
-require "packwerk/output_styles/plain"
-
module Packwerk
module Formatters
class OffensesFormatter
+ include Packwerk::OffensesFormatter
+
extend T::Sig
sig { params(style: OutputStyle).void }
def initialize(style: OutputStyles::Plain.new)
@style = style
end
- sig { params(offenses: T::Array[T.nilable(Offense)]).returns(String) }
+ sig { override.params(offenses: T::Array[T.nilable(Offense)]).returns(String) }
def show_offenses(offenses)
return "No offenses detected 🎉" if offenses.empty?
<<~EOS
#{offenses_list(offenses)}