Fail the build on translations whose placeholders drift - #6696
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughLint now treats ChangesString format validation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to The lint enforcement and member-count placeholder corrections align with their consumers, leaving the change ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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. A rabbit checks each counted line Comment |
andremion
left a comment
There was a problem hiding this comment.
Looks good. One note inline about what the check does not cover, not blocking.



Goal
Follow-up to #6695, which fixed a crash on v6 caused by an Italian translation reading
canale% 1$s.Lint reports that as
StringFormatCount, but the check is a warning by default, so./gradlew lintstayed green and the broken string shipped.
Closes AND-1529
Implementation
StringFormatCountto an error for every Android module, in the rootbuild.gradle.ktsnext to the existing shared lint config. A translation whose placeholders drift from the default
locale now fails the build instead of adding a line to a report nobody opens.
%1dspellings still left instream-chat-android-docsand the XML sample,spotted in review on Fix malformed format specifiers in localized strings #6695. Single argument strings, so nothing renders differently.
Scoped to this one check rather than
warningsAsErrors, which would pull in the existing backlog(121 warnings in the Compose module alone).
Testing
./gradlew lintpasses across every module. NoStringFormatfinding exists anywhere today, sothe promotion starts from a clean slate.
full width
%, and confirmed the build now fails on each withStringFormatCount. Reverted after.Summary by CodeRabbit
Bug Fixes
Quality Improvements