Skip to content

Add SwiftLint in CI #38

Description

@austin-smith

Goal

Add SwiftLint as a CI-only quality check.

Requirements

  • Pin SwiftLint 0.65.0 and verify its checksum.
  • Lint the app, unit tests, and UI tests before builds and tests run.
  • Run SwiftLint in strict mode.
  • Allow files up to 800 lines.
  • Temporarily ignore only the file_length rule for:
    • ComputerSolitaire/Views/Shared/ContentView.swift
    • ComputerSolitaire/Views/Cards/Styles/PixelCardViews.swift
  • Keep all other rules active for those two files.
  • Disable the todo rule.
  • Do not enable no_empty_block.
  • Enable only these opt-in rules:
    • accessibility_label_for_image
    • accessibility_trait_for_button
    • async_without_await
    • balanced_xctest_lifecycle
    • discarded_notification_center_observer
    • force_unwrapping
    • unhandled_throwing_task
  • Do not add a baseline, broad exclusions, or blanket suppressions.
  • Do not remove useful comments or documentation to satisfy lint.
  • Do not add Xcode integration or local build requirements.
  • Track removal of the two file-length exceptions in Resolve SwiftLint file-length exceptions #36.

Validation

  • SwiftLint reports zero violations.
  • macOS and iOS Simulator builds pass.
  • The macOS test suite passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions