Skip to content

Commit

Permalink
Merge pull request #269 from Shopify/ae-fix-bug-with-offenses-formatter
Browse files Browse the repository at this point in the history
Require OffensesFormatter in Configuration
  • Loading branch information
Alex Evanczuk committed Nov 29, 2022
2 parents d447a38 + 8e4e256 commit 7dcccdb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/packwerk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ class ApplicationValidator
autoload :Helpers
end
end

# Required to register the default OffensesFormatter
# We put this at the *end* of the file to specify all autoloads first
require "packwerk/formatters/offenses_formatter"
1 change: 0 additions & 1 deletion lib/packwerk/offenses_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def included(base)

sig { returns(T::Array[OffensesFormatter]) }
def all
require "packwerk/formatters/offenses_formatter"
T.unsafe(@offenses_formatters).map(&:new)
end

Expand Down
2 changes: 0 additions & 2 deletions test/support/offenses_formatter_plain.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# typed: strict
# frozen_string_literal: true

require "packwerk/formatters/offenses_formatter"

module Packwerk
module Formatters
class OffensesFormatterPlain < OffensesFormatter
Expand Down

0 comments on commit 7dcccdb

Please sign in to comment.