refactor(lint): clear the last five error spots (#147)
CI / ci (push) Canceled after 0s
CI / ci (push) Canceled after 0s
The repo contract "SwiftFormat + SwiftLint must both stay clean" had five error spots left beyond #146's PostsModel split, all mechanical. PostStore's enum body spanned 354 against 350 — the cursor-sidecar group (#66: CursorState + stateURL/readCursor/writeCursor, already its own MARK section) moves verbatim into a same-file nonisolated extension slotted chronologically before the #141 ingest MARK; the enum body lands at 334 and PostStore.CursorState keeps its qualified name, so no caller changes. Six single-char locals in ProseListTextView's dropIndex/rectY/isGap get real names (plus lo/hi in the same function — same violation class), one in ImageIngestTests' bandedRectY. The 194-char guard in ProseList.indent and the 221-char guard in OutlineEditorView.endDrag wrap in the house else-carries-the-brace form (#142 landmine avoided). PostStoreTests crossed its 1000-line ceiling at 1061 — split at the Pass substrate MARK per the MicropubModelTests precedent: the pass-adjacent write sides (#24/#29/#31) move byte-identical into PostStorePassTests.swift, shared helpers storeHome/readPost/readPiece stay internal in the original, and the #29 scenario header travels with its tests. 63 tests in, 63 out. The split's new parallel schedule exposed two latent test races, reproduced idle (~50% for the first) and fixed at the root: EditorSessionTests' sidecar poll inherited loop 1's deadline and timed out holding flush 1's default-zero sidecar (zeros, never nil — the telltale) — each loop now arms its own. SessionLifecycleTests' three stderrTail asserts raced the client's main-queue stderr drain (the #30 class) — a drainStderr bounded poll now precedes each. swiftlint reports zero errors on both targets; residual warning-tier notices match the standing #146 posture (the error tier is the bar; the one new notice is PostStorePassTests at 473/400 — a 1070-line suite cannot split into two files both under 400). swiftformat clean. Full suite 574/574 by xcresult executed count (573 unit + 1 UI smoke), twice consecutively plus the finish-up rerun. Closes #147
This commit is contained in:
1 parent
012f91727f
commit
4606fd4628
13 files changed
+639
-526
No files matched your search
@@ -153,7 +153,9 @@ nonisolated extension ProseList {
|
||||
/// minus our indent. No previous sibling → nil (boundary no-op).
|
||||
static func indent(_ item: Item, caret: Int, in text: String) -> Edit? {
|
||||
let scanned = lines(in: text)
|
||||
guard let idx = lineIndex(of: item.markerLine.location, in: scanned), let sibIdx = adjacentSiblingLine(scanned, from: idx, through: idx, indent: item.indent, direction: -1) else { return nil }
|
||||
guard let idx = lineIndex(of: item.markerLine.location, in: scanned),
|
||||
let sibIdx = adjacentSiblingLine(scanned, from: idx, through: idx, indent: item.indent, direction: -1)
|
||||
else { return nil }
|
||||
let delta = contentColumn(scanned[sibIdx].text) - item.indent
|
||||
guard delta > 0 else { return nil }
|
||||
let body = blockBody(text, item.block)
|
||||
|
||||
Reference in new issue
Block a user