Skip to content

Commit

Permalink
Fix issue where linter would disallow '@unchecked Sendable' in a comm…
Browse files Browse the repository at this point in the history
…ent (#241)
  • Loading branch information
calda authored Sep 25, 2023
1 parent fab63dd commit 0763661
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/AirbnbSwiftFormatTool/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,8 @@ custom_rules:
no_unchecked_sendable:
name: "`@unchecked Sendable` is discouraged."
regex: "@unchecked Sendable"
match_kinds:
- attribute.builtin
- typeidentifier
message: "Instead of using `@unchecked Sendable`, consider a safe alternative like a standard `Sendable` conformance or using `@preconcurrency import`. If you really must use `@unchecked Sendable`, you can add a `// swiftlint:disable:next no_unchecked_sendable` annotation with an explanation for how we know the type is thread-safe, and why we have to use @unchecked Sendable instead of Sendable. More explanation and suggested safe alternatives are available at https://github.com/airbnb/swift#unchecked-sendable."
severity: error

0 comments on commit 0763661

Please sign in to comment.