AdguardTeam / FiltersCompiler

A tool that compiles & validates filters
GNU Lesser General Public License v3.0
52 stars 12 forks source link

Our current exclusion does not remove `! Redirect:` directive #150

Open zloyden opened 2 years ago

zloyden commented 2 years ago

To reproduce it:

  1. Add my filter via @include to any template of the filter. For instance, Dandelion Sprout Annoyances
    @include "https://raw.githubusercontent.com/zloyden/fox/master/123.txt" /exclude="../../exclusions.txt"
  2. Run the filter build
  3. It does not work, but it should work due to exclusion Redirect:

Please also check that this Regex should also apply and remove the redirect directive.

Alex-302 commented 2 years ago

About regex - text /^\!\s*(R|r)edirect:/ without Redirect: and redirect:

ameshkov commented 2 years ago

Well, the proper reaction to redirect directive should be failing the build completely

ameshkov commented 2 years ago

The point is that when this happens we should react accordingly and change the FiltersRegistry

Alex-302 commented 2 years ago

Should we revert https://github.com/AdguardTeam/FiltersRegistry/pull/638 and just remove redirect: exclusions?