Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds Dutch language support: new Changes
Sequence Diagram(s)sequenceDiagram
participant User as "User"
participant PendingCheck as "PendingCheck"
participant Detector as "Profanity Detector"
participant Dictionary as "Dictionary"
participant DutchNormalizer as "DutchNormalizer"
participant DutchConfig as "Dutch Config"
User->>PendingCheck: dutch() or in('dutch')
PendingCheck->>Detector: set language = 'dutch'
User->>Detector: check(text)
Detector->>Dictionary: getNormalizerForLanguage('dutch')
Dictionary->>DutchNormalizer: instantiate / provide instance
Detector->>DutchNormalizer: normalize(text)
DutchNormalizer->>DutchNormalizer: Apply mappings (ë→e, Ü→U, etc.)
DutchNormalizer->>Detector: return normalized text
Detector->>DutchConfig: load profanities & substitutions
Detector->>Detector: match normalized text using substitutions & severities
Detector->>User: return results (offensive?, matches, censored text)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config/languages/dutch.php`:
- Line 90: Remove the incorrect entry 'neef' from the Dutch profanity list (the
string literal 'neef' shown in the diff) to avoid false positives; either delete
that line from the array or move it into your project's allowed/whitelist
collection for Dutch words and ensure any tests or lookup logic (the profanity
array used by your profanity-check routine) reference the updated list.
- Around line 63-64: The language entries array contains a duplicated string
'klerelijer'; remove the redundant occurrence so the array only contains a
single 'klerelijer' entry (locate the duplicate within the Dutch language
entries list where 'klerelijer' appears twice and delete one of them).
- Line 130: Remove the incorrect entry 'teer' from the Dutch profanity list (the
literal string 'teer' present in the array) so only actual profanities like
'tering' remain; edit the array in config/languages/dutch.php to delete the
'teer' element and ensure surrounding commas/array formatting stay valid.
- Line 109: The array entry 'rotterd' is truncated/incorrect; locate the string
'rotterd' in config/languages/dutch.php and either remove that array element if
it was added accidentally or replace it with the intended term (e.g., the
correct word like 'rotterdam' or the proper Dutch word you meant) so the
language list contains valid entries only.
- Line 35: The entry 'deboer' in the Dutch profanity list is a common surname
and should not be treated as profanity; remove the string 'deboer' from the
offensive-words array (or relocate it into a legitimate-names/whitelist array if
you maintain one) so it no longer triggers false positives, and add a short
comment noting why it was removed to prevent reintroduction.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9142c153-a410-4366-af68-1b740204bb66
📒 Files selected for processing (7)
config/languages/dutch.phpsrc/Core/Dictionary.phpsrc/Core/Normalizers/DutchNormalizer.phpsrc/PendingCheck.phptests/AllLanguagesApiTest.phptests/DutchLanguageDetectionTest.phptests/DutchStringNormalizerTest.php
deemonic
left a comment
There was a problem hiding this comment.
Thanks for contributing Dutch language support, @roeltinkhof! This is a great addition and follows the existing patterns well. The test coverage is solid too.
Before merging, there are a few issues in config/languages/dutch.php that need to be addressed:
Incorrect entries in the profanity list
These should be removed as they are not profanities and will cause false positives:
'deboer'(line 35) — Common Dutch surname (de Boer)'neef'(line 90) — Means "cousin/nephew", a normal Dutch word'rotterd'(line 109) — Appears to be a truncated word (Rotterdam?), not a profanity'teer'(line 130) — Means "tar" in Dutch. The actual profanity'tering'is already listed separately
Duplicate entry
'klerelijer'appears twice (lines ~63-64). One occurrence should be removed.
Misspelled false positive
'roterdam'in the false positives list should be'rotterdam'(double t).
Once these are fixed, this should be good to go!
|
Thanks for you review! I fixed the issues :) |
Hi!
Thanks for creating this package! I was looking for a profanity filter package and came across your package. I needed the Dutch language so I've added it. Perhaps you will also find it useful.
Thanks!
Summary by CodeRabbit
New Features
Tests