Repair shared SwiftLint gate without behavior change (KSE-0197) #271

Open
ios wants to merge 2 commits from ios/swiftlint-gate-repair into main
Member

Repair the shared SwiftLint gate without changing behavior (anchors KSE-0197, Redmine #37).

Why

Forgejo UI run 20089 (API run 20179, task 83206) fails on existing --strict violations on main, heaviest in Apple/CredentialExchange, plus Apple/Core/RuntimeEntitlements, Apple/Core/Service/AgentRuntime.swift, and some KeyStoreAgentCore / KeyStoreZcashCore files.

What

Formatting-only fixes across 22 Swift files; no lint rule weakened, gate not skipped:

  • Repo-wide swiftlint --fix for auto-fixable rules (number_separator, prefer_self_in_static_references, sorted_imports, explicit_init/is_multiple).
  • Hand edits: multiline calls to one-argument-per-line with brackets on own lines, function/type attributes to own lines, named closure parameters, size.isMultiple(of: 8).
  • Over-length literals split by concatenation with values verified byte-identical to main via an old-vs-new comparison script (code-signing requirements in CredentialImportIPC / CredentialProviderBridge, two UI strings in CredentialImportView). No security-requirement or user-facing string changed value.

Validation (honest limits)

  • Coordinator (Linux) with pinned SwiftLint 0.62.2 lint --strict: 0 violations, 0 serious in 239 files (the trailing SourceKit cache-plist message is a Linux-only artifact, not a violation).
  • The coordinator is NOT a native build env: no Apple build/SDK check was possible here. Native macOS CI + Bazel/Nix checks on this PR are the required proof before merge; root handles review, native CI and merge.

Notes

  • Unrelated pre-existing worktree files (.git_allowed_signers, Scripts/__pycache__/) deliberately left uncommitted.
Repair the shared SwiftLint gate without changing behavior (anchors KSE-0197, Redmine #37). ## Why Forgejo UI run 20089 (API run 20179, task 83206) fails on existing `--strict` violations on main, heaviest in `Apple/CredentialExchange`, plus `Apple/Core/RuntimeEntitlements`, `Apple/Core/Service/AgentRuntime.swift`, and some `KeyStoreAgentCore` / `KeyStoreZcashCore` files. ## What Formatting-only fixes across 22 Swift files; no lint rule weakened, gate not skipped: - Repo-wide `swiftlint --fix` for auto-fixable rules (`number_separator`, `prefer_self_in_static_references`, `sorted_imports`, `explicit_init`/`is_multiple`). - Hand edits: multiline calls to one-argument-per-line with brackets on own lines, function/type attributes to own lines, named closure parameters, `size.isMultiple(of: 8)`. - Over-length literals split by concatenation with values **verified byte-identical to main** via an old-vs-new comparison script (code-signing requirements in `CredentialImportIPC` / `CredentialProviderBridge`, two UI strings in `CredentialImportView`). No security-requirement or user-facing string changed value. ## Validation (honest limits) - Coordinator (Linux) with pinned SwiftLint 0.62.2 `lint --strict`: **0 violations, 0 serious in 239 files** (the trailing SourceKit cache-plist message is a Linux-only artifact, not a violation). - The coordinator is NOT a native build env: no Apple build/SDK check was possible here. Native macOS CI + Bazel/Nix checks on this PR are the required proof before merge; root handles review, native CI and merge. ## Notes - Unrelated pre-existing worktree files (`.git_allowed_signers`, `Scripts/__pycache__/`) deliberately left uncommitted.
Apple: repair shared SwiftLint gate without behavior change
Some checks failed
Build: Apple / Check (SwiftLint) (pull_request) Failing after 20s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 1m16s
Build: Web / Build (Web) (pull_request) Successful in 1m41s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 3m7s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
06444dd701
Pinned SwiftLint 0.62.2 --strict reported violations across Apple/
and Packages/ (heaviest: Apple/CredentialExchange). Fix with
formatting-only edits: repo-wide --fix for number_separator /
prefer_self / sorted_imports / is_multiple, then hand expansion of
multiline calls to one-argument-per-line, attributes to their own
lines, and value-preserving splits of over-length code-signing
requirement and UI literals (concatenated chunks verified
byte-identical to the originals).

No lint rules weakened, no behavior changed. Linux proof: 0
violations, 0 serious in 239 files. Native macOS proof left to CI.

Anchors KSE-0197; UI run 20089 (API run 20179, task 83206).
Repair shared SwiftLint gate: align continuations to statement+4, split multiline params/chain, brace void returns
Some checks failed
Build: Apple / Check (SwiftLint) (pull_request) Failing after 19s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 50s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Failing after 50s
Build: Web / Build (Web) (pull_request) Successful in 1m48s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 4m11s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
510d684b33
All 30 macOS-only violations from Check (SwiftLint) run 20122, no
behavior change, no rule weakening:

- 25x indentation_width: move over-aligned guard/if continuation lines
  to statement-indent+4 (whole blocks, including unflagged siblings),
  matching IndentationWidthRule candidate arithmetic.
- 2x multiline_parameters_brackets: split two-parameter declaration
  into parenthesised multiline form.
- 1x multiline_function_chains: one chain link per line.
- 2x return_value_from_void_function: braced XCTFail(); return.

Verified: rule-faithful local simulator reproduces all 25 pre-fix
sites and reports 0 post-fix; pinned Linux swiftlint 0.62.2 reports
0 violations in 239 files. macOS CI is final arbiter.

Anchor: KSE-0197. Canonical issue: key.store#37.
Some checks failed
Build: Apple / Check (SwiftLint) (pull_request) Failing after 19s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 50s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Failing after 50s
Build: Web / Build (Web) (pull_request) Successful in 1m48s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 4m11s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ios/swiftlint-gate-repair:ios/swiftlint-gate-repair
git switch ios/swiftlint-gate-repair
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
key-store/key.store!271
No description provided.