Skip to content

Commit b7dc8b5

Browse files
OffRangeclaude
andcommitted
[Docs] Add code style conventions to CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3db757a commit b7dc8b5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ prompt flow, or persistence semantics without explicit instruction.
7373
- **Rust FFI** — preserve type/memory-safety across JNI boundary
7474
- **Room schema** — check migration implications before changing entities
7575

76+
## Code Style
77+
78+
- **Brace-less `if`/`else`** for single-expression branches — even if the expression spans multiple
79+
lines (e.g. a `viewModelScope.launch { … }` block). Only use braces when a branch contains
80+
multiple statements.
81+
- **Trailing commas** on multi-line parameter lists and collection literals.
82+
7683
## Testing
7784

7885
- kotlin-test + MockK + kotlinx-coroutines-test; Compose UI tests with Espresso

0 commit comments

Comments
 (0)