llm: Expand string resource naming convention in CLAUDE.md#6856
llm: Expand string resource naming convention in CLAUDE.md#6856
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed a single-line documentation update to Code Review DetailsNo findings. The change is well-scoped, accurately documented, and consistent with the surrounding Code Style & Standards section. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6856 +/- ##
=======================================
Coverage 86.36% 86.36%
=======================================
Files 823 823
Lines 59019 59019
Branches 8669 8669
=======================================
Hits 50972 50972
Misses 5058 5058
Partials 2989 2989
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| - **Naming**: `camelCase` (vars/fns), `PascalCase` (classes), `SCREAMING_SNAKE_CASE` (constants), `...Impl` (implementations) | ||
| - **KDoc**: Required for all public APIs | ||
| - **String Resources**: Add new strings to `:ui` module (`ui/src/main/res/values/strings.xml`). Use typographic quotes/apostrophes (`"` `"` `'`) not escaped ASCII (`\"` `\'`) | ||
| - **String Resources**: Add new strings to `:ui` module (`ui/src/main/res/values/strings.xml`). Use typographic quotes/apostrophes (`"` `"` `'`) not escaped ASCII (`\"` `\'`). Name each resource from its own text content in `snake_case` — not with generic suffixes (`_message`, `_title`). E.g., `one_or_more_email_addresses_are_incorrect`, not `invalid_email_addresses_message`. |
There was a problem hiding this comment.
🌱 Not requesting changes now, but let's keep an eye on this section. If it gets any larger we should consider extracting the rules into an appropriate skill (implementing-android-code or a new modifying-string-resources skill) and/or moving them to STYLE_AND_BEST_PRACTICES.md. There are no String Resource rules in STYLE_AND_BEST_PRACTICES.md, so that may be why it's not following our convention in the first place.
There was a problem hiding this comment.
Claude actually wanted to add it to the STYLE_AND_BEST_PRACTICES.md.
There was a problem hiding this comment.
In that case, let go ahead and move it. If we see Claude still "misbehaving" we can move it back into CLAUDE.md or a skill.
There was a problem hiding this comment.
Will open a new PR with it
🎟️ Tracking
Internal tooling improvement — no Jira ticket.
📔 Objective
Expands the string resource guidance in
CLAUDE.mdto include the naming convention: each resource name should be derived from its own text content insnake_case, rather than using generic suffixes like_messageor_title.For example:
one_or_more_email_addresses_are_incorrect✅invalid_email_addresses_message❌This helps Claude (and contributors) produce consistent, self-documenting string resource names from the start, reducing review churn.