Limitations
This page lists the limitations of this redundancy checker, as far as known by the author
Known false positives
A false positive is a false alarm: a rule is reported as being redundant, while it actually isn't redundant.
- There are currently no false positives known.
Known false negatives
A false negative is a rule that is redundant (and can be detected as such with the given input), but isn't reported
-
The options $third-party and $domain=... are not linked
As a result, the redundancy checker won't find matches between rules of which one contains $third-party (or $~third-party) and the other one contains a domain that does match the third- or first-party requirement. Examples:
- ||site.com/ads.$~third-party should have been made redundant by /ads.$domain=site.com as both only apply to domain site.com
- ||site.com/ads.$domain=anothersite.com should have been made redundant by /ads.$third-party as both apply on domain anothersite.com
- ||site.com^$domain=~site.com should have been made redundant by ||site.com^$third-party as both apply everywhere except for domain site.com
The cause is that it is not trivial to extract the top level domain. For example: in the case of subdomain.domain.com this would be com, but in case of subdomain.domain.co.uk this would be co.uk.
-
Complex regular expression rules are only checked one-way
As a result, you will not be notified when a regular expression has been made redundant by another rule. Examples:
- /advert(isement)?/ should have been made redundant by /ad(v|s)/
- /-advert-images?-/ should have been made redundant by -advert-
The cause is that it is almost impossible to rewrite complex expressions in such a form that it can be checked against all possibilities. For example, the simple regex /\w{3}/ matches every possible filter of at least three successive alphanumeric characters. The regex /ad(s+|v)?/ matches ad, adv, ads, adss, adsss, and so on. It is close to impossible to check this against a normal filter or another regex within the duration of a day computing time and without the need for very complex code.
Ignored rules
Ignored rules are rules that the redundancy checker skips before even trying to find matches. Say, false negatives without the need for a second filter.
-
Rules with syntax errors
Rules for which it cannot be determined how to interpret them, are ignored. When such a rule is found, an error will be shown. Examples:
-
Simplified hiding rules
The old, deprecated format of hiding rules is not supported by the tool. When such a rule is found, a warning will be shown telling you how to convert this type of rule to the CSS3 format, if possible. Examples:
- #div
- #div(ads)
- #div(class=ads)
-
CSS4 hiding rules
CSS4 is still work-in-progress and is therefore subject to changes. Furthermore, at this moment most browsers don't fully support all functionality. For that reason, CSS4 selectors are not supported yet. Examples:
- ##[name*="ads" i]
- ##div! > #ads
-
Rules with unknown options
Rules with unknown options are usually the result of typos. However, it could also be an option that has been removed from or has recently been added to Adblock Plus. As it is unknown what the default status of those rules is ($third-party defaults to third- and first-party, while $popup defaults to disabled), those rules are skipped to prevent incorrect matches. A warning will be shown. Examples:
- $first-party
- $donottrack
- $~domain=site.com
- $domain=site.com,anothersite.com
-
Rules containing the $sitekey=... option
Rules containing the $sitekey= option are silently ignored. The behaviour of those rules is poorly documented, making it hard to determine the behaviour when this rule is combined with other options. Furthermore, there is only one filter list that uses them. Example:
- @@$sitekey=abcdefghijklmnopqrstuvwxyz
-
Rules containing the $generichide or $genericblock options
Rules containing the $generichide or $genericblock options are silently ignored. These rules are not yet officially released and their behaviour may still change. Example:
-
Rules with problematic domains
A rule will also be ignored if the domains of a rule are invalid or if a domain is included and excluded at the same time. Warnings are shown in those cases. Examples:
- $domain=site.com|~site.com
- $domain=site..com
- $domain=site.com,domain=anothersite.com
- site.com,,anothersite.com###ads
- site.com/###ads
- *.com###ads
-
Rules containing JavaScript object properties
Rules that contain JavaScript object properties may interfere with the code, thereby changing its behaviour. For that reason, those rules are silently ignored. Examples:
- constructor##abc
- $domain=~con.constructor
- __proto__
-
Rules containing :nth-child(An+B), :nth-last-child(An+B), :nth-of-type(An+B) or :nth-last-of-type(An+B) with A or B very large
Due to rounding errors in JavaScript with large numbers, the values of A and B may differ from the values in the filter. You'll probably never use them anyway, so they are silently ignored. Examples:
- ##:nth-child(590295810358705700001)
- ##:nth-of-type(10000000000000000000000000n+4)
-
Rules containing [Adblock] or [Adblock *]
Filter lists have to start with a line containing [Adblock] or similar in order to be a valid filter list. As this redundancy checker should also be able to operate with multiple filter lists as input, it is not possible to only filter out the first line, as the second occurrence of this line can indicate the next filter list. Therefore, all rules of this type are silently ignored. Example:
-
Rules that cannot match anything
If it can be determined on beforehand that a rule cannot match anything, then that rule will be ignored. Technically, those rules can be made redundant by every filter, but that would only be confusing, so a warning is thrown instead. Examples:
- ##:nth-child(0n-6)
- ##[class~="foo bar"]
- ##[ID]:not([id])
- ##:not(*)
- ##::before
- $image,~script,~image
- $document
- ||.foo.com^
- |://foo.com^