Skip to content

Commit 879492f

Browse files
committed
Added legacy_nsgeometry_functions rule rationale
1 parent 4e2c829 commit 879492f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/SwiftLintBuiltInRules/Rules/Idiomatic/LegacyNSGeometryFunctionsRule.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ struct LegacyNSGeometryFunctionsRule: Rule {
88
identifier: "legacy_nsgeometry_functions",
99
name: "Legacy NSGeometry Functions",
1010
description: "Struct extension properties and methods are preferred over legacy functions",
11+
rationale: """
12+
The CGRect extension properties are a more modern API (and are available on NSRect, which
13+
is a typealias for CGRect), and are supported on all Swift platforms.
14+
15+
The legacy functions are only supported on macOS and Mac Catalyst.
16+
"""
1117
kind: .idiomatic,
1218
nonTriggeringExamples: [
1319
Example("rect.width"),

0 commit comments

Comments
 (0)