{"action":"closed","issue":{"url":"https://api.github.com/repos/realm/SwiftLint/issues/2314","repository_url":"https://api.github.com/repos/realm/SwiftLint","labels_url":"https://api.github.com/repos/realm/SwiftLint/issues/2314/labels{/name}","comments_url":"https://api.github.com/repos/realm/SwiftLint/issues/2314/comments","events_url":"https://api.github.com/repos/realm/SwiftLint/issues/2314/events","html_url":"https://github.com/realm/SwiftLint/issues/2314","id":343701311,"node_id":"MDU6SXNzdWUzNDM3MDEzMTE=","number":2314,"title":"redundant_type_annotation autocorrect is really buggy","user":{"login":"Dschee","id":6942160,"node_id":"MDQ6VXNlcjY5NDIxNjA=","avatar_url":"https://avatars2.githubusercontent.com/u/6942160?v=4","gravatar_id":"","url":"https://api.github.com/users/Dschee","html_url":"https://github.com/Dschee","followers_url":"https://api.github.com/users/Dschee/followers","following_url":"https://api.github.com/users/Dschee/following{/other_user}","gists_url":"https://api.github.com/users/Dschee/gists{/gist_id}","starred_url":"https://api.github.com/users/Dschee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dschee/subscriptions","organizations_url":"https://api.github.com/users/Dschee/orgs","repos_url":"https://api.github.com/users/Dschee/repos","events_url":"https://api.github.com/users/Dschee/events{/privacy}","received_events_url":"https://api.github.com/users/Dschee/received_events","type":"User","site_admin":false},"labels":[{"id":955077824,"node_id":"MDU6TGFiZWw5NTUwNzc4MjQ=","url":"https://api.github.com/repos/realm/SwiftLint/labels/O:User","name":"O:User","color":"ededed","default":false},{"id":212343554,"node_id":"MDU6TGFiZWwyMTIzNDM1NTQ=","url":"https://api.github.com/repos/realm/SwiftLint/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-23T16:16:43Z","updated_at":"2018-07-26T11:49:49Z","closed_at":"2018-07-26T11:49:49Z","author_association":"CONTRIBUTOR","body":"I recently turned on `redundant_type_annotation` which seems to work fine when it comes to showing warnigns. But when running `swiftlint autocorrect` I get many changes that break my code. Here are a few examples of the changes made by this rule:\r\n\r\n**BEFORE**\r\n```swift\r\n enum EventType {\r\n     case amazingMonitor(isPresenting: Bool)\r\n     case amazingHistory(isPresenting: Bool)\r\n     case startNFCScan\r\n     case scanAmazingQRCode\r\n }\r\n\r\n```\r\n\r\n**AFTER** (the fist two cases mixed up)\r\n```swift\r\n enum EventType {\r\n     case amazingMonitor(isPresentingcase amazingHistory(isPresenting: Bool)\r\n     case startNFCScan\r\n     case scanAmazingQRCode\r\n }\r\n```\r\n\r\n**BEFORE**\r\n```swift\r\n import Foundation\r\n import MapKit\r\n \r\n // swiftlint:disable:next type_body_length\r\n final class AmazingTracking: NSObject {\r\n     // MARK: - Stored Type Properties\r\n     static let shared = AmazingTracking()\r\n\r\n```\r\n\r\n**AFTER** (the swiftlint disabling broken)\r\n```swift\r\n import Foundation\r\n import MapKit\r\n \r\n // swiftlintlength\r\n final class AmazingTracking: NSObject {\r\n     // MARK: - Stored Type Properties\r\n     static let shared = AmazingTracking()\r\n```\r\n\r\n**BEFORE**\r\n```swift\r\n protocol AmazingManagerDelegate: class {\r\n     func manager(_ manager: AmazingManager, didChange region: MKCoordinateRegion)\r\n```\r\n\r\n**AFTER** (the `: class` is gone)\r\n```swift\r\n protocol AmazingManagerDelegate {\r\n     func manager(_ manager: AmazingManager, didChange region: MKCoordinateRegion)\r\n```\r\n\r\nThere's a lot more if you need more examples, but I thinks this is a start."}}
{"actor":{"display_login":"Dschee"}}