feat: add Duplicates and Mismatch validators; enhance validation command options#3
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce a modular validation system for translation files, adding new validator classes for detecting key mismatches and duplicates. The command-line interface now supports specifying validators. Utility methods are added for resolving parsers and validators. Documentation is updated to reflect these enhancements, and tests are adjusted for duplicate detection. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Command as ValidateTranslationCommand
participant ParserUtil as ParserUtility
participant Validator as ValidatorInterface (e.g., MismatchValidator, DuplicatesValidator)
participant Output
User->>Command: Run validation command (optionally with --validator)
Command->>ParserUtil: resolveValidators() / resolveParserClasses()
ParserUtil-->>Command: List of validator class names
loop For each validator
Command->>Validator: validate(fileDetector, parserClass, allFiles)
Validator->>Output: Output validation results
end
Command->>User: Print summary and exit code
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (10)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Documentation
Tests