fix: framework type casing#55
Conversation
📝 WalkthroughWalkthroughAdds internal normalization for framework type values (maps common lowercase/uppercase variants to canonical casing: TYPO3, Symfony, Drupal, WordPress, Laravel), invokes it during configuration construction and before validation, and updates documentation, CLI help text, parser constant, validation enum, and a test fixture to use the canonical casing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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: 1
🤖 Fix all issues with AI agents
In `@db_sync_tool/utility/system.py`:
- Around line 118-124: Update the incorrect "Wordpress" capitalization to the
official "WordPress" in all referenced places: change the value in the
_FRAMEWORK_TYPE_MAP mapping (key 'wordpress') to 'WordPress', update the
Framework enum member label/value in db_sync_tool/utility/validation.py to use
"WordPress", adjust the Framework.WORDPRESS constant/representation in
db_sync_tool/utility/parser.py to "WordPress", and revise any CLI help text in
db_sync_tool/cli.py that currently shows "Wordpress" so it reads "WordPress";
preserve existing enum/member names (e.g., Framework.WORDPRESS) but correct only
the displayed/returned string capitalization.
🧹 Nitpick comments (1)
db_sync_tool/utility/system.py (1)
225-225: set_framework_type() already receives properly-cased values; normalization isn't bypassed in practice.The detected_type values in
automatic_type_detection()come from themappingdictionary keys, which are Framework enum constants ('TYPO3', 'Symfony', etc.)—already in canonical form. Additionally,automatic_type_detection()returns early if the type is already set (line 8), preventingset_framework_type()from being called afterget_configuration()completes in the current codebase. However, for defensive design, consider adding normalization toset_framework_type()to prevent potential issues if the function is called elsewhere with unnormalized input.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.