Skip to content

Commit

Permalink
Add example for #3146
Browse files Browse the repository at this point in the history
Fixes #3146
  • Loading branch information
marcelofabri committed Oct 24, 2022
1 parent 026caa4 commit b3a62cc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public struct RedundantTypeAnnotationRule: OptInRule, SwiftSyntaxCorrectableRule
var direction↓: Direction = Direction.up
"""),
Example("let values↓: [Int] = [Int]()")
Example("let values↓: [Int] = [Int]()"),
Example(#"static let version↓: AnnouncementStore.Attribute = AnnouncementStore.Attribute("Version")"#)
],
corrections: [
Example("var url↓: URL = URL()"): Example("var url = URL()"),
Expand All @@ -73,7 +74,9 @@ public struct RedundantTypeAnnotationRule: OptInRule, SwiftSyntaxCorrectableRule
}
}
"""),
Example("let values↓: [Int] = [Int]()"): Example("let values = [Int]()")
Example("let values↓: [Int] = [Int]()"): Example("let values = [Int]()"),
Example(#"static let version↓: AnnouncementStore.Attribute = AnnouncementStore.Attribute("Version")"#):
Example(#"static let version = AnnouncementStore.Attribute("Version")"#)
]
)

Expand Down

0 comments on commit b3a62cc

Please sign in to comment.