Skip to content

Add SwiftLint, SwiftFormat, and comprehensive linting#21

Merged
pasrom merged 2 commits intomainfrom
build/swiftlint
Mar 15, 2026
Merged

Add SwiftLint, SwiftFormat, and comprehensive linting#21
pasrom merged 2 commits intomainfrom
build/swiftlint

Conversation

@pasrom
Copy link
Copy Markdown
Owner

@pasrom pasrom commented Mar 15, 2026

Summary

  • SwiftLint with 77 opt-in rules + all default rules + analyzer rules (unused_declaration, unused_import)
  • SwiftFormat for consistent formatting, indentation, import ordering
  • CI pipeline: SwiftFormat → SwiftLint lint → SwiftLint analyze → tests
  • scripts/lint.sh for local use (--fix support)

Code changes

  • Fix all SwiftLint violations across 66 files
  • Apply SwiftFormat to entire codebase
  • Remove dead code (5 unused functions/properties)
  • Remove unused imports from 8 files

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 failures

Note

Single commit — add to .git-blame-ignore-revs after merge.

Test plan

  • CI passes (SwiftFormat + SwiftLint lint + SwiftLint analyze + tests)
  • scripts/lint.sh works locally
  • scripts/lint.sh --fix auto-corrects violations

@pasrom pasrom force-pushed the build/swiftlint branch 4 times, most recently from e1a3185 to fd21fb4 Compare March 15, 2026 10:56
pasrom added 2 commits March 15, 2026 12:48
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).
@pasrom pasrom merged commit 755f9bf into main Mar 15, 2026
4 checks passed
@pasrom pasrom deleted the build/swiftlint branch March 15, 2026 11:48
@pasrom pasrom added the chore Maintenance or non-functional changes label Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance or non-functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant