From 02f1036d2604fa62e49aa25289b5f452a4d9f048 Mon Sep 17 00:00:00 2001 From: Hal Eisen Date: Tue, 27 Oct 2026 14:11:12 -0700 Subject: [PATCH] ADFA-6605: CONTRIBUTING.md - Spotless ratchet is per file, not per line --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e9febe5fe..5e43bbdbe1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,8 +35,12 @@ scripts\install-git-hooks.bat ``` ## Source code format -Formatting is enforced by **Spotless** (`ratchetFrom = origin/stage`, so only changed lines are -checked). Run `./gradlew spotlessApply` before pushing; CI fails on unformatted changed lines. +Formatting is enforced by **Spotless** with `ratchetFrom = origin/stage`. The ratchet works per +file, not per line: every file that differs from `origin/stage` is formatted in full, so a one-line +edit to a nonconforming file can reformat the whole file. Commit that reformat on its own +(`style: spotless reformat, no functional change`) before the functional change - see +[CLAUDE.md](CLAUDE.md#code-style). Run `./gradlew spotlessApply` before pushing; CI fails on +unformatted changed files, except that ktlint currently skips some Kotlin files (ADFA-6603). - **Indentation:** tabs. **Line endings:** LF. - **Java:** the Eclipse formatter (config `spotless.eclipse-java.xml`), with member sorting and import ordering.