Skip to content

Commit 4ab4576

Browse files
committed
Bisect functionality
1 parent 27b83e1 commit 4ab4576

12 files changed

Lines changed: 1296 additions & 12 deletions

File tree

Cargo.lock

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ sysinfo = "0.38"
1212
anyhow = "1"
1313
fs2 = "0.4"
1414
tempfile = "3"
15+
ctrlc = "3"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,11 @@ brave-shields-cli filters add "example.com##h1"
9696
brave-shields-cli filters remove "||example.com^"
9797
brave-shields-cli filters clear
9898
brave-shields-cli filters load rules.txt
99+
brave-shields-cli filters bisect rules.txt
99100
```
100101

102+
The `bisect` command performs an interactive binary search to find which filter rule in a file is causing a site issue. It loads all rules, then iteratively exceptions out half the candidates with `@@` prefixes, asking at each step whether the issue persists. A working file (`bisect-filters.txt`) and state file (`bisect-state.json`) are written to the current directory. Original filters are restored when bisect completes. If interrupted or quit mid-session, the state is preserved and can be resumed with `--resume bisect-state.json`.
103+
101104
#### profiles
102105

103106
List available browser profiles.

0 commit comments

Comments
 (0)