AdguardTeam / AdguardTeam/FiltersCompiler

Valid rules considered as invalid

未关闭
#257 1 条评论 0 个 reaction 已指派 1 人 已被 @maximtop 认领 在 GitHub 查看
bug Priority: P4
主要语言
JavaScript
星标
64
派生
11
PR 合并指标
30 天内没有已合并 PR

描述

* not a HOST rule
```
Error: "Rule has spaces, seems to be an host rule" in the rule: "/^https:\/\/[a-z][a-z][a-z][a-z][a-z][a-z][a-z][a-z]+\.com\/en\/([a-z][a-z]+\/)?([a-z][a-z]+\/)?[a-z][a-z]+\?([a-z]+=[^&=? ]*&)*id=[12][0-9][0-9][0-9][0-9][0-9][0-9]/$script,third-party,match-case"
```

* Invalid rule only in report
```
Error: "Invalid cosmetic rule, wrong brackets" in the rule: "otomi-games.com##.clean-grid-grid-post:has(> [id^="otomi-"] + .clean-grid-grid-post-details-full) {remove:true;}"
```
In [the filters](https://github.com/AdguardTeam/AdguardFilters/blob/b279e7977cc6065d1811c9ed48ed2eb8384dc77c/BaseFilter/sections/specific.txt#L18) we have it with `#$?#`
```
otomi-games.com#$?#.clean-grid-grid-post:has(> [id^="otomi-"] + .clean-grid-grid-post-details-full) { remove: true; }
```

* modifier is known
```
Error: "Unknown modifier: xmlprune=/MPD/Period[contains(@id,'ad-')]" in the rule: "/manifest.mpd$xmlprune=/MPD/Period[contains(@id\,'ad-')],domain=hulu.com"
```

* All these rules are correct, in AdBlock syntax from EasyList
```
Error: "Unknown pseudo-class ':0' in selector: '#readerChromeOverlayBottom.readerChromeOverlayBottom-banner-desktop {bottom:0 !important;}'" in the rule: "read.amazon.*###readerChromeOverlayBottom.readerChromeOverlayBottom-banner-desktop {bottom:0 !important;}"
Error: "Invalid cosmetic rule, wrong brackets" in the rule: "hitomi.la##.content > div[class]:not([class*="-"]) {min-height:45px !important;}"
Error: "Invalid cosmetic rule, wrong brackets" in the rule: "hitomi.la##.top-content > div[class]:not([class*="-"]) {min-height:45px !important;}"
Error: "Unknown pseudo-class ':162px' in selector: '.cUDaEv {margin-top:162px !important;}'" in the rule: "benzinga.com##.cUDaEv {margin-top:162px !important;}"
Error: "Unknown pseudo-class ':0' in selector: '.gZyLpV .mobile-header {margin-top:0 !important;}'" in the rule: "benzinga.com##.gZyLpV .mobile-header {margin-top:0 !important;}"
Error: "Unknown pseudo-class ':0' in selector: '.iOxiqE .mobile-header {margin-top:0 !important;}'" in the rule: "benzinga.com##.iOxiqE .mobile-header {margin-top:0 !important;}"
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。