Repository navigation
Enable every SwiftLint opt-in rule and fix every violation - #392
Merged
Merged
Conversation
.swiftlint.yml now runs `opt_in_rules: [all]` plus every analyzer rule (capture_variable, typesafe_array_init, unused_declaration, unused_import; explicit_self is the one left out, as it contradicts redundant_self). The rules still disabled are each listed with a one-line reason: those whose fixes swift-format undoes (contrasted_opening_brace, sorted_imports, opening_brace, line_length, trailing_comma), those that contradict another enabled rule (explicit_type_interface, explicit_acl, explicit_top_level_acl, extension_access_modifier, explicit_enum_raw_value, raw_value_for_camel_cased_codable_enum, prefixed_toplevel_constant, no_grouping_extension, required_deinit), and those that conflict with a repo convention or settled decision (prefer_nimble, nimble_operator, sorted_enum_cases, no_magic_numbers, discouraged_default_parameter). trailing_whitespace and statement_position are back on: the tree was already clean of both. The fixes are mechanical and change no behaviour: one declaration per file (with the file named for it), type and file contents in SwiftLint's order, one argument/parameter per line once a list wraps, a switch case's body and a conditional return on their own lines, explicit closure parameter names, doc comments on public API, comments in empty blocks, `let` hoisted out of case patterns, unneeded throws/async removed (the nonisolated ones that keep work off the caller's actor are spelled `@concurrent` instead), and the unused imports the analyzer found. A few rules are suppressed line by line, each with its reason, where the fix would change behaviour (URLSession's async delegate methods, NSString-only APIs, tri-state Bools read from the Accessibility API or a launch flag). The seven accessibility findings: decorative images are hidden from VoiceOver, a setup step's checkmark is labelled "Done", and the ready window's tap gesture keeps no button trait, since it only releases the search field's focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…scan unused_declaration duplicates periphery (which also sees the test target, so it needed suppressions for test-only helpers), and the extra analyzer pass made SourceKit segfault in most ios-check runs. Its two suppressions go with it. The Mac periphery scan gets --clean-build, as the iPhone scan has: after this branch's file splits and renames, a reused index reported ~60 live declarations as unused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wrapping arguments one per line made three near-identical blocks token-identical, so jscpd flagged them: - KeyboardLifecycleTests.eventually now delegates to the suite-wide until. - searchMenu calls searchBounded with its own pressable predicate (the default stays the general isPressable). - StyleProfileStore and TextShortcutStore write through JSONText.write, which keeps the failable encode's reasoning in one place; the profile store still posts its change notification only when the write happened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rom a blurt checkout The file splits gave each new file the original's whole import header; the newly enabled `unused_import` analyzer rule flagged 86 of them. Two test files needed CGFloat, which Foundation only re-exports, so they import CoreGraphics, as KeepOpenTests already does. The committed pbxproj named the repo-root folder reference after the worktree directory rather than `blurt`, which CI reads as drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
swiftlint analyze's unused_import counted CoreGraphics as unused: it only re-exports CGFloat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cancelled-paste test reuses GatedInjector rather than a private copy of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alexkroman
marked this pull request as ready for review
November 25, 2026 07:18
alexkroman
enabled auto-merge
November 25, 2026 07:18
…pt-in # Conflicts: # App/BlurtiOS/BlurtiOS/Sources/DictationCoordinator+Commands.swift # App/BlurtiOS/BlurtiOS/Sources/DictationCoordinator.swift # App/BlurtiOS/BlurtiOSCore/KeyboardRelayInjector.swift # App/BlurtiOS/BlurtiOSTests/DictationCoordinatorTests+Dictation.swift # App/BlurtiOS/BlurtiOSTests/DictationCoordinatorTests.swift # App/BlurtiOS/BlurtiOSUITests/AccessibilityAuditTests.swift
swiftlint analyze's unused_import counted Foundation as unused: it only re-exports Dispatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else. Rebased onto main after #392 turned on every SwiftLint opt-in rule: the split files follow one declaration per file, one argument per line once wrapped, and swiftlint's member order. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
This was referenced Nov 25, 2026
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else; CI's ios-build builds the BlurtAssemblyAI scheme beside BlurtEngine's. The split files follow the all-opt-in SwiftLint rules from #392. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Also on the iPhone: - Labels whose title can wrap use WrappingLabelStyle (BlurtDesign), so the consent sheet's disclosures, Settings' "How fast can you type?" and Home's return hint can't come out a line short at AX XXXL. - The accessibility audit's default-size "Dynamic Type unsupported" is checked rather than taken on its word (ScalingCheck): it fails only if the same text is no taller at AX XXXL, ending the CI-only misreading of Settings' last rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else; CI's ios-build builds the BlurtAssemblyAI scheme beside BlurtEngine's. The split files follow the all-opt-in SwiftLint rules from #392. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Also on the iPhone: - Labels whose title can wrap use WrappingLabelStyle (BlurtDesign), so the consent sheet's disclosures, Settings' "How fast can you type?" and Home's return hint can't come out a line short at AX XXXL. - The accessibility audit's default-size "Dynamic Type unsupported" is checked rather than taken on its word (ScalingCheck): it fails only if the same text is no taller at AX XXXL, ending the CI-only misreading of Settings' last rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else; CI's ios-build builds the BlurtAssemblyAI scheme beside BlurtEngine's. The split files follow the all-opt-in SwiftLint rules from #392. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Also on the iPhone: - Labels whose title can wrap use WrappingLabelStyle (BlurtDesign), so the consent sheet's disclosures, Settings' "How fast can you type?" and Home's return hint can't come out a line short at AX XXXL. - The accessibility audit's default-size "Dynamic Type unsupported" is checked rather than taken on its word (ScalingCheck): it fails only if the same text is no taller at AX XXXL, ending the CI-only misreading of Settings' last rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
alexkroman
pushed a commit
that referenced
this pull request
Nov 25, 2026
Splits the AssemblyAI integration into three library products so the SDK can be used on its own and another provider can sit beside the engine: - AssemblyAI: the pure SDK. DictationClient (streaming upload plus the 413 /v1/transcribe fallback, warm-up and metrics), SpeechClient (TTS), GatewayChatClient (LLM Gateway), the realtime, async, OAuth and key-validation clients. No Blurt code. - BlurtEngine: provider-neutral. TranscriberProtocol and TranscriberError, SpeechSynthesizing, ChatCompleting with ChatRequest and ChatReply, GatewayConnection and GatewayClient, KeyValidation, SpeechServices, LiveTurn and KeyTermList. Imports neither other module. - BlurtAssemblyAI: the adapter that applies Blurt's policy to the SDK: AssemblyAITranscriber, AssemblyAISpeechSynthesizer, AssemblyAIChat, SpeechServices.assemblyAI(), FileTranscriber, the account and sign-in code, and UserAgent. The Mac and iPhone apps import BlurtAssemblyAI where they compose the provider, and BlurtEngine everywhere else; CI's ios-build builds the BlurtAssemblyAI scheme beside BlurtEngine's. The split files follow the all-opt-in SwiftLint rules from #392. Includes Alex's simplification of the split (one key-term parser, one User-Agent stamp). Also on the iPhone: - Labels whose title can wrap use WrappingLabelStyle (BlurtDesign), so the consent sheet's disclosures, Settings' "How fast can you type?" and Home's return hint can't come out a line short at AX XXXL. - The accessibility audit's default-size "Dynamic Type unsupported" is checked rather than taken on its word (ScalingCheck): it fails only if the same text is no taller at AX XXXL, ending the CI-only misreading of Settings' last rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DS5B1V4svBfswwXUrVzCKq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables every SwiftLint opt-in rule (
opt_in_rules: [all], 237 lint rules) plus the analyzer rules, and fixes every violation. That was 17,182 violations across the enabled rules.Config (
.swiftlint.yml)A rule is excluded only for a stated reason, written beside it:
line_length,trailing_comma,opening_brace,contrasted_opening_brace,sorted_imports.explicit_type_interfacevsredundant_type_annotationexplicit_acl,explicit_top_level_aclandextension_access_modifiervsno_extension_access_modifierexplicit_enum_raw_valueandraw_value_for_camel_cased_codable_enumvsredundant_string_enum_valueprefixed_toplevel_constantvs lowerCamelCase constantsno_grouping_extensionvs one extension per conformancerequired_deinitvsno_empty_blockprefer_nimbleandnimble_operator: the tests use Swift Testing and add no dependencies.sorted_enum_cases: case order is behavior (CaseIterablepicker order, implicit raw values).no_magic_numbers: it flags the named constants themselves.discouraged_default_parameter: defaulted parameters are the injection seams.Analyzer rules:
capture_variable,typesafe_array_initandunused_import.explicit_selfis off: it contradictsredundant_self.unused_declarationis off: periphery already gates unused code, across the app and the tests, and this extra analyzer pass made SourceKit segfault in most localios-checkruns.The fixes
swiftlint --fixand a SwiftSyntax pass. That covers member and type ordering, one declaration per file (about 230 types split into their own files), argument and parameter wrapping, and case bodies and returns on their own lines.Visible but behavior-preserving:
private/fileprivatemembers widened to module-internal where a split-out file needs them. Nothing becamepublic.noneenum cases renamed. Every one is an in-memory enum (PressHandshake's action,SignInSession.Load,SelectionRead,DictationKeyGate.Action,MeetingAutoRecord.Action); none is persisted. The persistedSoundPack.silentkeeps its id"none".throws/asyncremoved from witnesses and stubs.30 suppressions remain, each with a reason in the code. Example:
async_without_awaiton the URLSession delegates, where a synchronous method would never be called.Accessibility lint findings:
Transferable, not a view) can't take the rule's fix, so it carries a suppression with the reason.ReadyView: the button trait would make VoiceOver announce the whole window as a button.Also included:
check.sh's Mac periphery scan gets--clean-build, as the iPhone scan has. After file splits and renames, a reused index reported about 60 live declarations as unused.scripts/design-tokens.swiftnow emits lint-clean tokens.Verification
scripts/check.shon the agent's commit (BLURT_SIM_DEVICE="iPhone 17"): exit 0.BlurtiOSCorecoverage 95.71%.swiftlint,swiftlint analyze, swift-format, periphery, prettier and markdownlint pass.swiftlint --strictis clean, shellcheck and shfmt are clean, and the invariants (14) hold.One known risk I can't fully rule out by reading: stored properties initialize in declaration order, and
type_contents_orderreordered members. If a reordered property's initializer had a side effect, behavior could change. The suites pass, but this is the change to watch.🤖 Generated with Claude Code