Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dangerfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class CodeUsageDetector {
case deferred
case swiftUIText
case task
case dispatchLegacy

var message: String {
switch self {
Expand All @@ -336,6 +337,11 @@ class CodeUsageDetector {
New `Task {}` added in file %@ at line %d.
Please add a concurrency reviewer on your PR: \(contacts)
"""
case .dispatchLegacy:
return """
DispatchLegacy is used in file %@ at line %d.
Please replace with `dispatch` instead and call it from the main actor
"""
}
}

Expand All @@ -353,6 +359,8 @@ class CodeUsageDetector {
return "Text(\""
case .task:
return " Task {"
case .dispatchLegacy:
return ".dispatchLegacy("
}
}

Expand Down