android: ktlint forces a multiline signature at two parameters
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 2m55s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 5m13s
Desktop (Tauri) / Update manifest (push) Successful in 3s
Android / Kotlin + Rust (APK) (push) Successful in 8m3s

`resolvedNoteColor` and `noteTintFor` are the first non-composable functions
here to take more than one parameter, and ktlint_official's function-signature
rule requires each parameter on its own line once there are two or more. Four
findings on one and four on the other, all the same rule.

Nothing had type-checked: ktlint is step 6 and the unit tests are step 8, so the
fixture pinning the derived-tint mirror never ran.

I checked line width, trailing whitespace and KDoc adjacency before pushing —
the three that have bitten before — and not this one. The list of rules learned
by failing CI is not the list of rules.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-26 12:38:23 -04:00
co-authored by Claude Opus 5
parent 6f173b166b
commit cddaf35280
2 changed files with 9 additions and 3 deletions
@@ -81,7 +81,11 @@ fun derivedTint(id: String): String {
* `known` is passed in rather than read from `NOTE_TINTS` so this file stays free of
* Compose and therefore testable; `noteTintFor` supplies the real set.
*/
fun resolvedNoteColor(id: String, color: String, known: Set<String>): String =
fun resolvedNoteColor(
id: String,
color: String,
known: Set<String>,
): String =
when {
color.isNotEmpty() && color != "default" && color in known -> color
// A draft carries DRAFT_ID (""), so there is no identity to derive from yet.
@@ -185,5 +185,7 @@ fun noteTint(key: String): NoteTint = NOTE_TINTS[key] ?: NOTE_TINTS.getValue("de
*/
@Composable
@ReadOnlyComposable
fun noteTintFor(id: String, color: String): NoteTint =
noteTint(resolvedNoteColor(id, color, NOTE_TINTS.keys))
fun noteTintFor(
id: String,
color: String,
): NoteTint = noteTint(resolvedNoteColor(id, color, NOTE_TINTS.keys))