{"slug":"swift","title":"Swift","extensions":[".swift"],"entry_languages":["Swift"],"prompts":22,"repos":2,"sample":[{"repository":"apple/container","slug":"apple-container","checks":0},{"repository":"ghostty-org/ghostty","slug":"ghostty-org-ghostty","checks":0}],"tools":[],"headline":[],"raw_md":"https://awesomereviewers.com/raw/verify/swift.md","raw_json":"https://awesomereviewers.com/raw/verify/swift.json","url":"https://awesomereviewers.com/verify/swift/","baseline":{"slug":"every-change","title":"Any change","topics":["Code Style","Naming Conventions"],"checks":[{"kind":"formatting","title":"Formatting","method":"formatting","method_slug":"formatting","catches":"Layout drift that buries the real change in the diff.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null},{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":"The compiler type-checks on every build and test run; a failing build is this check failing."},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-semantic-naming-rules","title":"Semantic Naming Rules","description":"Adopt a “meaning-first” naming standard: identifiers must communicate semantics, representation, and units—so readers can’t guess. Apply: - Match behavior: rename helpers/methods when behavior changes (avoid names like `installDefaultKernel()` if it no longer does “install default”).","repository":"apple/container","domain":"orchestration","topic":"Naming Conventions","language":"Swift","updated":"2026-06-05","comments":8,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-semantic-naming-rules.md"},{"slug":"container-prefer-readable-conditionals","title":"Prefer Readable Conditionals","description":"When updating or adding code, keep control flow and non-trivial expressions easy to reason about. Rules of thumb: - Avoid nested ternary operators; use `switch` (or equivalent) for branching decisions.","repository":"apple/container","domain":"orchestration","topic":"Code Style","language":"Swift","updated":"2026-05-11","comments":5,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-prefer-readable-conditionals.md"},{"slug":"ghostty-semantic-name-clarity","title":"Semantic name clarity","description":"Names should clearly and accurately reflect the purpose of variables, methods, and other identifiers. Follow these principles: 1. Use descriptive, specific names that convey exact purpose","repository":"ghostty-org/ghostty","domain":"devtools","topic":"Naming Conventions","language":"Swift","updated":"2025-06-02","comments":4,"stars":32864,"raw":"https://awesomereviewers.com/raw/ghostty-semantic-name-clarity.md"},{"slug":"swift-follow-swift-naming-conventions","title":"Follow Swift naming conventions","description":"Ensure code follows established Swift naming conventions and remains consistent with domain terminology: 1. Use standard Swift parameter labels (e.g., use `named:` instead of `called:`):","repository":"tensorflow/swift","domain":"ml-systems","topic":"Naming Conventions","language":"Swift","updated":"2019-10-11","comments":3,"stars":6136,"raw":"https://awesomereviewers.com/raw/swift-follow-swift-naming-conventions.md"},{"slug":"ghostty-prefer-flat-control-flow","title":"Prefer flat control flow","description":"Minimize code nesting by using Swift features like `guard` statements and early returns instead of deeply nested if-else structures. When multiple code branches end with a return statement, avoid nesting with `else` clauses.","repository":"ghostty-org/ghostty","domain":"devtools","topic":"Code Style","language":"Swift","updated":"2025-06-21","comments":2,"stars":32864,"raw":"https://awesomereviewers.com/raw/ghostty-prefer-flat-control-flow.md"}],"prompt_count":5},"changes":[{"slug":"security","title":"Authentication, input handling, secrets, permissions","topics":["Security"],"checks":[{"kind":"security-scanning","title":"Security scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Injection, unsafe APIs and tainted data reaching a sink.","tool":null,"alternatives":[],"note":null},{"kind":"secret-scanning","title":"Secret scanning","method":"static_analysis","method_slug":"static-analysis","catches":"Credentials and tokens committed to the repository.","tool":null,"alternatives":[],"note":null},{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-validate-untrusted-inputs","title":"Validate untrusted inputs","description":"Treat CLI args, config, and IPC payloads as untrusted. Enforce semantic invariants at the boundary, then again during decoding/parsing (defense in depth), and add targeted negative tests.","repository":"apple/container","domain":"orchestration","topic":"Security","language":"Swift","updated":"2026-08-09","comments":6,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-validate-untrusted-inputs.md"},{"slug":"maplibre-native-default-to-minimum-permissions","title":"Default to minimum permissions","description":"Always default to the least invasive privacy settings and explicitly request elevated permissions only when necessary for specific functionality. For location-based features, start with reduced accuracy and request precise location only when required with a clear purpose explanation.","repository":"maplibre/maplibre-native","domain":"app-frameworks","topic":"Security","language":"Swift","updated":"2024-05-20","comments":1,"stars":1411,"raw":"https://awesomereviewers.com/raw/maplibre-native-default-to-minimum-permissions.md"}],"prompt_count":2},{"slug":"interfaces","title":"Public APIs, signatures, error paths, nullability","topics":["API","Error Handling","Null Handling"],"checks":[{"kind":"type-checking","title":"Type checking","method":"static_analysis","method_slug":"static-analysis","catches":"Wrong types, unhandled null or None, call signatures broken across modules.","tool":null,"alternatives":[],"note":"The compiler type-checks on every build and test run; a failing build is this check failing."},{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-error-handling-without-silence","title":"Error handling without silence","description":"Treat errors as first-class: don’t blanket-suppress them with `try?`, `try!`, `_ =` result discards, or `2>/dev/null` unless you can prove the failure is expected and harmless. For unexpected failures, either propagate (`throw`) or explicitly log and recover in a deterministic way.","repository":"apple/container","domain":"orchestration","topic":"Error Handling","language":"Swift","updated":"2026-08-07","comments":13,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-error-handling-without-silence.md"},{"slug":"container-optional-safe-null-handling","title":"Optional-Safe Null Handling","description":"Adopt a consistent null/absence policy: 1) Model absence explicitly - If a value may be missing (older on-disk configs, optional server fields, optional UI inputs), represent it with an optional type (e.g., `String?`) and make the corresponding `Codable` field tolerant of omission.","repository":"apple/container","domain":"orchestration","topic":"Null Handling","language":"Swift","updated":"2026-07-30","comments":11,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-optional-safe-null-handling.md"},{"slug":"container-stable-api-contracts","title":"Stable API Contracts","description":"When designing or evolving API surfaces (including XPC/wire formats and CLI-to-client contracts), treat the request/response shape as a long-lived contract: keep it semantically high-level, strongly typed, and backward/forward compatible.","repository":"apple/container","domain":"orchestration","topic":"API","language":"Swift","updated":"2026-06-21","comments":6,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-stable-api-contracts.md"},{"slug":"ghostty-prefer-safe-optional-handling","title":"Prefer safe optional handling","description":"Always use Swift''s built-in mechanisms for safely handling optional values instead of force unwrapping or manual nil handling. Specifically: 1. Use optional binding (`if let`, `guard let`) instead of checking for nil and force unwrapping:","repository":"ghostty-org/ghostty","domain":"devtools","topic":"Null Handling","language":"Swift","updated":"2025-06-21","comments":3,"stars":32864,"raw":"https://awesomereviewers.com/raw/ghostty-prefer-safe-optional-handling.md"}],"prompt_count":4},{"slug":"services","title":"Service and framework code","topics":["Fastify","NestJS","Spring","Axum","Celery","Temporal"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"algorithms","title":"Algorithms, parsers, data transforms","topics":["Algorithms"],"checks":[{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null},{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"proofs","title":"Proofs and specifications","method":"formal","method_slug":"formal","catches":"Design-level bugs in protocols and algorithms, checked against a specification.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-deterministic-parsing-and-matching","title":"Deterministic Parsing And Matching","description":"When implementing parsing and lookup/diff algorithms on strings/filesystems, guarantee determinism and correctness by (1) normalizing inputs into a canonical form before comparison/keying, (2) explicitly handling ambiguity instead of silently choosing an arbitrary match, and (3) deduping by semantic change keys while keeping a stable order.","repository":"apple/container","domain":"orchestration","topic":"Algorithms","language":"Swift","updated":"2026-04-23","comments":7,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-deterministic-parsing-and-matching.md"}],"prompt_count":1},{"slug":"concurrency","title":"Threads, async code, locks, shared state","topics":["Concurrency"],"checks":[{"kind":"concurrency-model-checking","title":"Concurrency model checking","method":"formal","method_slug":"formal","catches":"Races and orderings that fail only under specific interleavings.","tool":null,"alternatives":[],"note":null},{"kind":"ub-detection","title":"Undefined-behaviour detection","method":"formal","method_slug":"formal","catches":"Memory-safety and aliasing violations in unsafe code.","tool":null,"alternatives":[],"note":null},{"kind":"property-tests","title":"Property-based tests","method":"testing","method_slug":"testing","catches":"Edge-case inputs nobody wrote a test for; invariants over generated data.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-atomic-concurrency-contracts","title":"Atomic Concurrency Contracts","description":"All concurrency-sensitive code must follow an “atomic + lifecycle-valid” contract. **Rules** 1. **Make check-then-act atomic.** If you verify a precondition and then mutate shared state (e.g., “volume not in use => delete”), do both while holding the same synchronization boundary (actor/lock). Prefer closure-based helpers that keep the lock for the whole...","repository":"apple/container","domain":"orchestration","topic":"Concurrency","language":"Swift","updated":"2026-06-26","comments":8,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-atomic-concurrency-contracts.md"}],"prompt_count":1},{"slug":"networking","title":"Network calls, retries, timeouts, protocols","topics":["Networking","Axios"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"fuzzing","title":"Fuzzing","method":"testing","method_slug":"testing","catches":"Crashes, panics and hangs on malformed input, especially in parsers and decoders.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-dns-and-timeout-rules","title":"DNS and Timeout Rules","description":"When implementing networking features (DNS, proxies, RPC/XPC), make behavior consistent with the correct layer and avoid imposing policy that breaks end-to-end semantics.","repository":"apple/container","domain":"orchestration","topic":"Networking","language":"Swift","updated":"2026-07-24","comments":4,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-dns-and-timeout-rules.md"}],"prompt_count":1},{"slug":"ui","title":"UI components and pages","topics":["React","Next","Next.js","Vue","Angular"],"checks":[{"kind":"browser-tests","title":"End-to-end browser tests","method":"testing","method_slug":"testing","catches":"User flows broken across components, routing and the network.","tool":null,"alternatives":[],"note":null},{"kind":"linting","title":"Linting","method":"static_analysis","method_slug":"static-analysis","catches":"Bug-prone patterns, unused code and conventions the formatter does not cover.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"data","title":"Databases, migrations, caching","topics":["Database","Migrations","Caching"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"performance","title":"Hot paths and performance","topics":["Performance Optimization"],"checks":[],"prompts":[{"slug":"container-avoid-repeated-hot-path-work","title":"Avoid repeated hot-path work","description":"In performance-sensitive code, avoid doing expensive operations repeatedly inside loops (repeated flattening/sorting, repeated filesystem attribute resolution, repeated regex/compiler/formatter construction, repeated list+search scans). Also ensure your tree/hierarchy logic uses consistent keys for both ordering and relationship detection.","repository":"apple/container","domain":"orchestration","topic":"Performance Optimization","language":"Swift","updated":"2026-07-23","comments":7,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-avoid-repeated-hot-path-work.md"}],"prompt_count":1},{"slug":"ai","title":"Model, prompt and LLM code","topics":["AI","Pytorch"],"checks":[{"kind":"unit-tests","title":"Unit and integration tests","method":"testing","method_slug":"testing","catches":"Behaviour regressions on the paths the tests exercise.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"observability","title":"Logging, metrics, tracing","topics":["Logging","Observability"],"checks":[],"prompts":[{"slug":"container-use-structured-logger-consistently","title":"Use structured logger consistently","description":"Adopt a single logging approach across commands and services: - **Never use `print`/direct `FileHandle.standardError.write` in production code** for user-facing or diagnostic messages. Use `Logger`.","repository":"apple/container","domain":"orchestration","topic":"Logging","language":"Swift","updated":"2026-05-17","comments":10,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-use-structured-logger-consistently.md"}],"prompt_count":1},{"slug":"ci-config","title":"CI workflows and configuration files","topics":["CI/CD","Configurations"],"checks":[{"kind":"workflow-linting","title":"CI workflow linting","method":"static_analysis","method_slug":"static-analysis","catches":"Broken GitHub Actions syntax, script injection, over-broad token permissions.","tool":null,"alternatives":[],"note":null},{"kind":"file-hygiene","title":"File hygiene","method":"formatting","method_slug":"formatting","catches":"Invalid JSON, YAML or TOML, merge markers, trailing whitespace, oversized files.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-config-resolution-discipline","title":"Config Resolution Discipline","description":"When adding/updating configuration handling, resolve configuration once into a single immutable runtime context, and make precedence/fallback behavior explicit.","repository":"apple/container","domain":"orchestration","topic":"Configurations","language":"Swift","updated":"2026-05-27","comments":5,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-config-resolution-discipline.md"},{"slug":"ghostty-centralize-configuration-management","title":"Centralize configuration management","description":"Avoid hardcoded or duplicated configuration values by centralizing them in a dedicated location. When configurations are needed across multiple components, extract the logic for accessing and applying them so it can be reused. This prevents inconsistencies when configurations change and makes the codebase more maintainable.","repository":"ghostty-org/ghostty","domain":"devtools","topic":"Configurations","language":"Swift","updated":"2025-02-25","comments":3,"stars":32864,"raw":"https://awesomereviewers.com/raw/ghostty-centralize-configuration-management.md"},{"slug":"tree-sitter-strategic-configuration-exclusions","title":"Strategic configuration exclusions","description":"When configuring build exclusions in package manifests or configuration files, be strategic and minimal. Only exclude files that cause actual build issues (like non-source files that generate compilation warnings), while preserving important files such as licenses and directories that may be relevant for future features. Modern tooling often handles file...","repository":"tree-sitter/tree-sitter","domain":"runtimes","topic":"Configurations","language":"Swift","updated":"2025-01-04","comments":2,"stars":21799,"raw":"https://awesomereviewers.com/raw/tree-sitter-strategic-configuration-exclusions.md"},{"slug":"yoga-keep-configuration-versions-current","title":"Keep configuration versions current","description":"Regularly review and update version specifications in configuration files to align with current standards and internal practices. When updating versions, consider both the benefits of newer features and potential compatibility impacts.","repository":"facebook/yoga","domain":"runtimes","topic":"Configurations","language":"Swift","updated":"2023-06-16","comments":2,"stars":18255,"raw":"https://awesomereviewers.com/raw/yoga-keep-configuration-versions-current.md"}],"prompt_count":4},{"slug":"dependencies","title":"Dependencies and lockfiles","topics":[],"checks":[{"kind":"dependency-audit","title":"Dependency audit","method":"supply_chain","method_slug":"supply-chain","catches":"Known-vulnerable or disallowed dependencies and licenses.","tool":null,"alternatives":[],"note":null},{"kind":"lockfile-check","title":"Lockfile consistency","method":"supply_chain","method_slug":"supply-chain","catches":"A lockfile that no longer matches its manifest.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[],"prompt_count":0},{"slug":"tests","title":"The tests themselves","topics":["Testing"],"checks":[{"kind":"mutation-testing","title":"Mutation testing","method":"testing","method_slug":"testing","catches":"Tests that keep passing whatever the code does.","tool":null,"alternatives":[],"note":null},{"kind":"version-matrix","title":"Version and platform matrix","method":"testing","method_slug":"testing","catches":"Breakage on a runtime version, OS or feature combination you did not run locally.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-meaningful-test-level-correctness","title":"Meaningful, Test-Level Correctness","description":"Tests should be aligned with what they claim to validate, and placed at the right layer (unit vs integration). Concretely: - **Don’t rely on system side effects in unit tests.** If the test depends on vmnet/network/kernel/fs behavior, prefer **integration** coverage; unit tests should focus on pure logic.","repository":"apple/container","domain":"orchestration","topic":"Testing","language":"Swift","updated":"2026-07-16","comments":13,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-meaningful-test-level-correctness.md"}],"prompt_count":1},{"slug":"docs","title":"Documentation and comments","topics":["Documentation"],"checks":[{"kind":"docs-build","title":"Docs build","method":"static_analysis","method_slug":"static-analysis","catches":"Broken cross-references, links and markup in documentation.","tool":null,"alternatives":[],"note":null},{"kind":"spelling","title":"Spelling","method":"formatting","method_slug":"formatting","catches":"Typos in identifiers, comments and docs.","tool":null,"alternatives":[],"note":null}],"prompts":[{"slug":"container-document-invariants-and-changes","title":"Document invariants and changes","description":"When introducing/altering API fields, parsing rules, or behavior, ensure documentation makes the code’s correctness contract explicit. Apply this standard:","repository":"apple/container","domain":"orchestration","topic":"Documentation","language":"Swift","updated":"2026-05-27","comments":5,"stars":48787,"raw":"https://awesomereviewers.com/raw/container-document-invariants-and-changes.md"}],"prompt_count":1}]}
