Skip to content

Commit 50caf3d

Browse files
committed
fixup! Migrate StatementPositionRule from SourceKit to SwiftSyntax
1 parent a021d60 commit 50caf3d

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Source/SwiftLintBuiltInRules/Rules/Lint/AccessibilityLabelForImageRule.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ struct AccessibilityLabelForImageRule: ASTRule, OptInRule {
6161
severity: configuration.severity,
6262
location: Location(file: file, byteOffset: offset))
6363
)
64-
}
65-
66-
// If dictionary did not represent an Image, recursively check substructure,
67-
// unless it's a container that hides its children from accessibility or is labeled.
68-
else if dictionary.substructure.isNotEmpty {
64+
} else if dictionary.substructure.isNotEmpty {
65+
// If dictionary did not represent an Image, recursively check substructure,
66+
// unless it's a container that hides its children from accessibility or is labeled.
6967
if dictionary.hasAccessibilityHiddenModifier(in: file) ||
7068
dictionary.hasAccessibilityElementChildrenIgnoreModifier(in: file) ||
7169
dictionary.hasAccessibilityLabelModifier(in: file) {

Source/SwiftLintBuiltInRules/Rules/Lint/AccessibilityTraitForButtonRule.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ struct AccessibilityTraitForButtonRule: ASTRule, OptInRule {
6666
severity: configuration.severity,
6767
location: Location(file: file, byteOffset: offset))
6868
)
69-
}
70-
71-
// If dictionary did not represent a View with a tap gesture, recursively check substructure,
72-
// unless it's a container that hides its children from accessibility.
73-
else if dictionary.substructure.isNotEmpty {
69+
} else if dictionary.substructure.isNotEmpty {
70+
// If dictionary did not represent a View with a tap gesture, recursively check substructure,
71+
// unless it's a container that hides its children from accessibility.
7472
if dictionary.hasAccessibilityHiddenModifier(in: file) ||
7573
dictionary.hasAccessibilityElementChildrenIgnoreModifier(in: file) {
7674
continue

0 commit comments

Comments
 (0)