Skip to content

added option for resetting the trie - #46

Merged
master-wayne7 merged 1 commit into
developfrom
feat/reset-trie
Aug 6, 2026
Merged

added option for resetting the trie#46
master-wayne7 merged 1 commit into
developfrom
feat/reset-trie

Conversation

@master-wayne7

@master-wayne7 master-wayne7 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Description

What does this PR do?
added option for resetting the trie

Summary by CodeRabbit

  • New Features

    • Added a way to check whether the text filter is initialized.
    • Added an option to reset the filter and clear its loaded data.
  • Tests

    • Added coverage confirming initialization and reset behavior.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 921867d3-27ad-41e1-976d-bc6f63a77120

📥 Commits

Reviewing files that changed from the base of the PR and between 9670384 and 75b8adb.

📒 Files selected for processing (2)
  • lib/src/safe_text_filter.dart
  • test/profanity_filter_test.dart

📝 Walkthrough

Walkthrough

SafeTextFilter now exposes its initialization state and provides a reset method that clears the loaded trie. Tests verify state changes after reset and English initialization.

Changes

SafeTextFilter lifecycle

Layer / File(s) Summary
Initialization state and reset behavior
lib/src/safe_text_filter.dart, test/profanity_filter_test.dart
SafeTextFilter adds the public isInitialized getter and reset() method. Tests verify the state before and after initialization and reset.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reset-trie

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@master-wayne7
master-wayne7 merged commit 83abebf into develop Aug 6, 2026
1 of 3 checks passed
@master-wayne7
master-wayne7 deleted the feat/reset-trie branch August 6, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant