mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
897 B
897 B
description, globs, alwaysApply
| description | globs | alwaysApply | |||
|---|---|---|---|---|---|
| Kotlin coding style extending common rules |
|
false |
Kotlin Coding Style
This file extends the common coding style rule with Kotlin-specific content.
Formatting
- ktfmt or ktlint are mandatory for consistent formatting
- Use trailing commas in multiline declarations
Immutability
valovervaralways- Immutable collections by default (
List,Map,Set) - Use
data classwithcopy()for immutable updates
Null Safety
- Avoid
!!-- use?.,?:,require, orcheckNotNull - Handle platform types explicitly at Java interop boundaries
Expression Bodies
Prefer expression bodies for single-expression functions:
fun isAdult(age: Int): Boolean = age >= 18
Reference
See skill: kotlin-patterns for comprehensive Kotlin idioms and patterns.