Add SwiftLint, SwiftFormat, and comprehensive linting#21
Merged
Conversation
e1a3185 to
fd21fb4
Compare
Add full linting and formatting infrastructure: - SwiftLint with 77 opt-in rules + all default rules + analyzer rules (unused_declaration, unused_import) - SwiftFormat (v0.59+) for consistent formatting, indentation, imports - lint.sh script for local use (--fix support) - CI pipeline: SwiftFormat → SwiftLint lint → SwiftLint analyze → tests Code changes from applying linting: - Fix all SwiftLint violations (force_unwrapping, force_try, for_where, sorted_imports, discouraged_optional_collection, etc.) - Apply SwiftFormat to entire codebase (indentation, trailing commas, wrap arguments, operator spacing) - Remove dead code: ParticipantReader.writeParticipants, WhisperKitEngine.unloadModel/transcribeDualSource, PipelineQueue.errorJobs, MeetingTranscriberApp.shouldAutoWatch - Remove unused imports from 8 files Result: 0 SwiftLint violations, 0 SwiftFormat issues, 483 tests pass.
Add scripts/lint.sh to project structure and Key Commands sections. Update ci.yml description to reflect 3 parallel jobs (lint, analyze, test).
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.
Summary
unused_declaration,unused_import)scripts/lint.shfor local use (--fixsupport)Code changes
Verification
swiftlint lint --strict: 0 violations (64 files)swiftlint analyze --strict: 0 violations (31 files)swiftformat --lint: 0 files need formatting (64 files)swift test: 483 tests pass, 0 failuresNote
Single commit — add to
.git-blame-ignore-revsafter merge.Test plan
scripts/lint.shworks locallyscripts/lint.sh --fixauto-corrects violations