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
When filters are applied, we require all specified filters to approve
an item in order for it to match. When configuration is combined from
multiple sources, this can make it extremely difficult to integrate
filters into an existing list.
We would like to extend an existing passlist, blocklist, or
combination, but that's an impractical transformation on general YAML
(the filters are lists, and the only sane transformation at the
generic level is to concatenate lists).
Specifying two passlists, blocklists or combinations does not have the
desired effect, because of the `all` logic governing multiple filters,
such that we get the intersection of the specifications, not the
union. That is, e.g. for two passlists, only items on both lists can
match.
This commit adds a `combine` function to filters, such that they can
opt to absorb multiple declarations of the same type. When a second
passlist is encountered in the same context, the items in the second
specification are passed to the object made for the first. It can then
treat the specification as extending its own passlist.
The FilterFactory has been updated to use this combine logic.
Signed-off-by: Ed Smith <[email protected]>
0 commit comments