feat(rules): add Swift review rules - #918
Open
VladimirBrejcha wants to merge 1 commit into
Open
Conversation
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.
Contributor
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). |
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.
Description
Adds Swift review rules so
.swiftfiles no longer fall back to the genericdefault.mdchecklist.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 asrust.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.swiftso Swift test files follow the other languages' test-exclusion convention (Xcode test targets and SwiftPMTests/directories both use*Tests.swiftfiles).Closes #917 (part of #470).
Type of Change
Checklist
make testpassesmake checkpasses