You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report. Warning.process(regexp) is not supported. It ends up working by accident because when only a single element is in the process array, sort_by! does not raise. We cannot support both regexps and strings as the path argument, because the algorithm used needs the paths sorted.
I'm generally against defensive programming type checks in Ruby, but I'm OK with a type check in this case. Can you work on a PR for this?
Problem
I was wondering if
Warning.process(/foo/) { :raise }
is explicitly supported as it works only if no prior calls toWarning.process
has been made.Consider this code:
The first argument of Warning.process must be a path and actions can be passed as a Hash:
Proposed solution
Make
Warning.process(/foo/) { :raise }
always fail.Happy to create a PR if the proposed solution is accepted 💪
Refs
Refs https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91789
The text was updated successfully, but these errors were encountered: