badwords: combine the whitelisting into a single regex#20880
badwords: combine the whitelisting into a single regex#20880
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the scripts/badwords checker by consolidating whitelist removals into a single regex to reduce runtime, and includes a couple of small documentation wording tweaks.
Changes:
- Combine multiple whitelist patterns into one precompiled regex in
scripts/badwords. - Extend whitelist removal to include backticked text removal via the whitelist mechanism.
- Minor wording/grammar adjustments in documentation files.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/badwords | Combines whitelist stripping into a single regex to improve performance. |
| docs/tests/FILEFORMAT.md | Minor grammar adjustment in test file format documentation. |
| docs/cmdline-opts/connect-to.md | Wording tweak (“host name” → “hostname”). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
2f96f0c to
b150d92
Compare
Also: make the whitelist matches case insensitve Takes the script execution time down from 3.6 seconds to 1.1 on my machine.
found when improving the badwords whitelisting logic
b150d92 to
d981d13
Compare
|
augment review |
🤖 Augment PR SummarySummary: Speeds up 🤖 Was this summary useful? React with 👍 or 👎 |
Takes it down from 3.6 seconds to 1.1 on my machine.