Raising errors on deprecations

When using IRB or running tests I see dry-types deprecation messages.
I would like to find all the places where we have to fix deprecations.

What I would like is to have our CI raise errors when we use deprecated patterns. So I can find them and fix them.

Is there some config I can set so deprecations will be raised as errors, instead of warnings?

Thanks

Something like this will do:

def (Dry::Core::Deprecations.logger).warn(string)
  if string.include?('dry-types')
    raise string
  else
    super
  end
end

Great, thank you