- Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
rule-requestRequests for a new rules.Requests for a new rules.
Description
We could have a legacy_uigraphics_functions, which can already be defined as a custom rule:
custom_rules: legacy_uigraphics_functions: included: ".*\\.swift" name: "Legacy UIGraphics functions" regex: "(UIGraphicsBeginImageContextWithOptions|UIGraphicsBeginImageContext|UIGraphicsGetImageFromCurrentImageContext|UIGraphicsEndImageContext)\\s*\\(" message: "This UIGraphics method is deprecated. Use UIGraphicsImageRenderer and related APIs instead." severity: warning These 4 methods are already marked API_TO_BE_DEPRECATED in UIKit Headers.
This new rule would match existing SwiftLint rule such as legacy_cggeometry_functions and legacy_nsgeometry_functions
- configurable: no
- opt-in: yes, to match existing rules
legacy_*_functions? The replacement API (UIGraphicsImageRenderer) exists since iOS 10.
Metadata
Metadata
Assignees
Labels
rule-requestRequests for a new rules.Requests for a new rules.