FiltersCompiler
                                
                                
                                
                                    FiltersCompiler copied to clipboard
                            
                            
                            
                        A tool that compiles & validates filters
There are redundant rules in cname lists, such as the tracker list: ``` ||www.1016.lookinews.com^ ||1016.lookinews.com^ ``` The first rule can be removed, as the second is more widely applicable, and...
Related to https://github.com/AdguardTeam/FiltersRegistry/pull/947 Currently, an extra modifier with a modifier marker is added, making the rule incorrect. 
https://github.com/AdguardTeam/FiltersDownloader/releases
### Issue details At the moment we see only one problematic line, if something went wrong  If a filter compiled from dozens of files, it is hard to find...
Currently rules with `$header` are marked as invalid: ```adblock ! Error: "Unknown modifier: header=link:/adsco\.re\/>;rel=preconnect/" in the rule: "://www.*.com/*.css|$script,third-party,header=link:/adsco\.re\/>;rel=preconnect/" ://www.*.com/*.css|$script,third-party,header=link:/adsco\.re\/>;rel=preconnect/ ! Error: "Unknown modifier: header=link:/adsco\.re\/>;rel=preconnect/" in the rule: "://www.*.com*/images/*.min.js|$script,third-party,header=link:/adsco\.re\/>;rel=preconnect/" ://www.*.com*/images/*.min.js|$script,third-party,header=link:/adsco\.re\/>;rel=preconnect/ !...
At the moment it is impossible to check the optimization result before uploading the changes to the server. Add an option to use remote or local `optimization_config.json`.
To simplify the checking of changes in the filters compiler, it is necessary to be able to test different versions of the compiler with the same version of raw filters....
IDK what is causing this, but `amazon.de,amazon.co.jp,amazon.com#%#//scriptlet('xml-prune', 'xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start)', '[value="Ad"]', '.mpd')` for uBO in Base is compiled into `amazon.de,amazon.co.jp,amazon.com#@#+js(xml-prune, xpath(//*[name()="Period"][.//*[@value="Ad"]] | //*[name()="Period"]/@start), [value="Ad"], .mpd)` and causing problem.
https://github.com/AdguardTeam/tsurlfilter/issues/112 `Invalid rule in AdGuard Base filter: ||serverside.ai/vod/mpds/*.mpd$replace=/().*?\/ad\/.*?()/$1$2/`
https://github.com/gorhill/uBlock/commit/81498474d6d440b032681aa9952d593749b39efb