Skip to content

Commit

Permalink
Require parser class in advance
Browse files Browse the repository at this point in the history
  • Loading branch information
euglena1215 committed Jan 6, 2024
1 parent 4b722f2 commit 73a79b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/packwerk/file_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def self.included(base)

sig { returns(T::Array[FileParser]) }
def self.all
# Require each parser class in advance because it cannot be obtained unless it is required.
Dir[File.join(__dir__, "parsers", "*.rb")].each { |file| require file }

T.unsafe(@parsers).map(&:new)
end

Expand Down

0 comments on commit 73a79b3

Please sign in to comment.