This repository was archived by the owner on Oct 16, 2020. It is now read-only.
forked from gorhill/uBlock
-
Notifications
You must be signed in to change notification settings - Fork 20
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Nano Linter issues mega thread #1
Copy link
Copy link
Open
Description
Filter Linter
Show warning if:
- Too many or too few arguments are passed in for a script snippet
- Filter is platform specific and current platform does not support it
- A script snippet injection rule only have negated domain (it will be converted to an exception rule)
- A filter will match word boundary but the boundary character is not explicitly given
- A common mistake is detected
Common mistakes:
||example.com^$generichide- Forgot@@orimportant
It is quite rare that someone want to use important on generichide, chances are he forgot@@.
Detection logic: If a filter hasgenerhichidebut notimportantand is not an exception filter, then dispatch a warning./example-path/- Forgot trailing*/example-path/im- Regular expression flags in procedural cosmetic filters gorhill/uBlock#3372
When matching part of a path, trailing wildcard is required, otherwise it becomes a RegExp rule.
Detection logic: If a RegExp rule only contains letters, numbers,-,_, and., then dispatch a warning.|example.com^- Missed one|
Can happen when copying filter, didn't select the whole line.
Detection logic: For start anchor, if what is anchored does not include protocol, dispatch a warning.||example.com- Forgot^
Although the filter works, it is usually a mistake as it can matchexample.communicate.example.org.
Detection logic: If a filter has host name anchor but no^nor:nor/, dispatch a warning.example.blogspot.*##element- Wildcard matching half of public suffix
Filter will not work as expected.
Detection logic: Could be difficult to implement.
Whitelist Linter
Show warning if:
- RegExp is used but that is unlikely to be the intent of the user
Reactions are currently unavailable