Android comments describe the code to a stranger (#6223)
CI & Build / Python lint (push) Successful in 2s
CI & Build / Build now, or wait for Android? (push) Successful in 3s
Android / Build, or is the channel already serving this? (push) Successful in 3s
Desktop (Tauri) / Build, or is the channel already serving this? (push) Successful in 2s
Desktop (Tauri) / Web tests, clippy, Rust tests and rustfmt (push) Skipped
Desktop (Tauri) / Tauri desktop (Linux) (push) Skipped
Desktop (Tauri) / Windows installer (cross-compiled) (push) Skipped
Desktop (Tauri) / Update manifest (push) Skipped
CI & Build / Web typecheck and unit tests (push) Successful in 9s
CI & Build / Python tests (push) Successful in 15s
Android / Core and FFI clippy and tests (push) Successful in 27s
CI & Build / integration (push) Successful in 1m39s
CI & Build / Build & push image (push) Skipped
Android / Kotlin + Rust (APK) (push) Successful in 7m55s
Android / Build the server image (push) Successful in 6s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Build now, or wait for Android? (push) Successful in 3s
Android / Build, or is the channel already serving this? (push) Successful in 3s
Desktop (Tauri) / Build, or is the channel already serving this? (push) Successful in 2s
Desktop (Tauri) / Web tests, clippy, Rust tests and rustfmt (push) Skipped
Desktop (Tauri) / Tauri desktop (Linux) (push) Skipped
Desktop (Tauri) / Windows installer (cross-compiled) (push) Skipped
Desktop (Tauri) / Update manifest (push) Skipped
CI & Build / Web typecheck and unit tests (push) Successful in 9s
CI & Build / Python tests (push) Successful in 15s
Android / Core and FFI clippy and tests (push) Successful in 27s
CI & Build / integration (push) Successful in 1m39s
CI & Build / Build & push image (push) Skipped
Android / Kotlin + Rust (APK) (push) Successful in 7m55s
Android / Build the server image (push) Successful in 6s
Milestone 546 "Bring the repo to the comment standard (rule 32) and compose defaults (rule 198)", step #6223 "Comment standard sweep: Android client". KDoc, comments, manifest and resource notes, Gradle and TOML comments and the ffi crate's docs now state what the code does and the non-obvious why in the present tense. Issue, Scribe-note, milestone (M13, M304, M315, M12) and family-idea references are gone, as are comparisons to Minstrel and the narration of what used to be: the capture sheet the editor replaced, the per-note colour story, the operator's device-pass feedback, the bindgen-as-[[bin]] failure, the 0.60 edge alpha before it was re-solved, and the checker bugs behind check-strings/check-symbols. Hazards stay as facts: the signing key that can't be rotated, the alias that keeps the earlier name, PKCS12's single password, unwind over abort, the UTC date-picker read, the DerivedTint/colors.ts mirror. One stale claim is gone: DerivedTint said the web had no test runner, but notes/grammar.test.ts runs the same tint cases. detekt.yml said "these two places" over a list of five. 49 files, comments only: a comment-stripping diff of every changed file against HEAD is identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Flag capitalised identifiers that are neither imported nor declared locally.
|
||||
|
||||
This exists because ktlint and detekt are both structurally blind to it: they
|
||||
parse Kotlin without resolving symbols, so a *missing import* is invisible to
|
||||
them and both pass a file that cannot compile. The first sync-screen push failed
|
||||
in CI on exactly that (`Unresolved reference 'Build'` — `android.os.Build` was
|
||||
lost in a file split), after a clean local analyzer run.
|
||||
ktlint and detekt parse Kotlin without resolving symbols, so a *missing import*
|
||||
is invisible to them and both pass a file that cannot compile.
|
||||
|
||||
Not a type checker and not trying to be. `compileDebugKotlin` in CI is the real
|
||||
one; this is a cheap pre-push filter for the single mistake that survives every
|
||||
@@ -13,10 +10,8 @@ other local gate. It errs toward false positives — anything it cannot account
|
||||
for is reported rather than assumed fine.
|
||||
|
||||
It also checks MEMBERS of this package's own `object` declarations — `Foo.bar()`
|
||||
where `Foo` is an object declared here. That case was added after moving a
|
||||
function between two objects and forgetting to paste it into the second: the
|
||||
call site read `Other.thing()`, resolved fine as far as the leading token, and
|
||||
failed in CI (785ebdb).
|
||||
where `Foo` is an object declared here — so a function moved between two objects
|
||||
and missed at a call site is caught.
|
||||
|
||||
Still NOT caught, so a clean run is not over-read: members of anything declared
|
||||
outside this package, members reached through a variable rather than a type
|
||||
@@ -106,8 +101,7 @@ def object_members(src: str) -> dict:
|
||||
if depth == 0:
|
||||
# Nested TYPES count as members too: `Foo.Bar` where Bar is a
|
||||
# data class inside object Foo is an ordinary reference, and
|
||||
# leaving them out made the checker report four false positives
|
||||
# the first time an object held one.
|
||||
# leaving them out would report each one as unknown.
|
||||
decl = re.match(
|
||||
r"\s*(?:@\w+\s+)*(?:public |private |internal |protected )?"
|
||||
r"(?:const |lateinit |inline |suspend |data |sealed |enum |value |abstract |open )*"
|
||||
|
||||
Reference in New Issue
Block a user