Skip to content

feat(rules): add Swift review rules - #918

Open
VladimirBrejcha wants to merge 1 commit into
alibaba:mainfrom
VladimirBrejcha:feat/swift-rules
Open

feat(rules): add Swift review rules#918
VladimirBrejcha wants to merge 1 commit into
alibaba:mainfrom
VladimirBrejcha:feat/swift-rules

Conversation

@VladimirBrejcha

Copy link
Copy Markdown

Description

Adds Swift review rules so .swift files no longer fall back to the generic default.md checklist.

  • rule_docs/swift.md — precision-focused, per-category Swift review rules: optionals and runtime failures, ARC/retain cycles, error handling, Swift concurrency and isolation (actors, @MainActor, Sendable, cancellation, continuations), SwiftUI state and lifecycle, SwiftData/Core Data persistence, HealthKit/privacy, StoreKit entitlements, Combine, networking (signed URLs, App Attest), web views/deep links, performance, security, unsafe interoperability, and testing correctness. Written in the same style as rust.md/go.md (defect classes only; no duplication of compiler/SwiftLint/analyzer findings).
  • system_rules.json — register **/*.swift -> swift.md.
  • default_exclude_patterns.json — add **/*Tests.swift so Swift test files follow the other languages' test-exclusion convention (Xcode test targets and SwiftPM Tests/ directories both use *Tests.swift files).

Closes #917 (part of #470).

Type of Change

  • New feature / enhancement (language support)

Checklist

  • I have performed a self-review of my code
  • make test passes
  • make check passes

Adds a Swift review-rule doc (rule_docs/swift.md) covering optionals and
runtime failures, ARC/retain cycles, error handling, Swift concurrency and
isolation, SwiftUI state and lifecycle, SwiftData/Core Data persistence,
HealthKit/privacy, StoreKit entitlements, Combine, networking (signed URLs,
App Attest), web views/deep links, performance, security, unsafe interop, and
testing correctness. Registers **/*.swift in system_rules.json and adds
**/*Tests.swift to default_exclude_patterns.json so Swift test files follow
the other languages' convention. Updates the default-rules, fallback, and
excluded-path tests.
@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(allowlist): add Swift support

2 participants