{"action":"created","issue":{"url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/277","repository_url":"https://api.github.com/repos/nicklockwood/SwiftFormat","labels_url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/277/labels{/name}","comments_url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/277/comments","events_url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/277/events","html_url":"https://github.com/nicklockwood/SwiftFormat/issues/277","id":342987277,"node_id":"MDU6SXNzdWUzNDI5ODcyNzc=","number":277,"title":"Custom operators parsing","user":{"login":"mpsnp","id":2770238,"node_id":"MDQ6VXNlcjI3NzAyMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2770238?v=4","gravatar_id":"","url":"https://api.github.com/users/mpsnp","html_url":"https://github.com/mpsnp","followers_url":"https://api.github.com/users/mpsnp/followers","following_url":"https://api.github.com/users/mpsnp/following{/other_user}","gists_url":"https://api.github.com/users/mpsnp/gists{/gist_id}","starred_url":"https://api.github.com/users/mpsnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpsnp/subscriptions","organizations_url":"https://api.github.com/users/mpsnp/orgs","repos_url":"https://api.github.com/users/mpsnp/repos","events_url":"https://api.github.com/users/mpsnp/events{/privacy}","received_events_url":"https://api.github.com/users/mpsnp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-20T06:23:53Z","updated_at":"2018-07-20T08:25:04Z","closed_at":null,"author_association":"NONE","body":"It would be great to have a possibility to list  custom operators which are used in project, because now, swiftformat recognizes binary operator as postfix unary operator and makes code incorrect:\r\n\r\nBefore formatting:\r\n```\r\n            button |> roundedButtonStyle <> {\r\n                $0.layer.cornerRadius = 15\r\n                $0.bounds.size.height = 30\r\n            }\r\n```\r\n\r\nAfter formatting:\r\n\r\n```\r\n            button |> roundedButtonStyle<> {\r\n                $0.layer.cornerRadius = 15\r\n                $0.bounds.size.height = 30\r\n            }\r\n```"},"comment":{"url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/comments/406526921","html_url":"https://github.com/nicklockwood/SwiftFormat/issues/277#issuecomment-406526921","issue_url":"https://api.github.com/repos/nicklockwood/SwiftFormat/issues/277","id":406526921,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjUyNjkyMQ==","user":{"login":"mpsnp","id":2770238,"node_id":"MDQ6VXNlcjI3NzAyMzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2770238?v=4","gravatar_id":"","url":"https://api.github.com/users/mpsnp","html_url":"https://github.com/mpsnp","followers_url":"https://api.github.com/users/mpsnp/followers","following_url":"https://api.github.com/users/mpsnp/following{/other_user}","gists_url":"https://api.github.com/users/mpsnp/gists{/gist_id}","starred_url":"https://api.github.com/users/mpsnp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpsnp/subscriptions","organizations_url":"https://api.github.com/users/mpsnp/orgs","repos_url":"https://api.github.com/users/mpsnp/repos","events_url":"https://api.github.com/users/mpsnp/events{/privacy}","received_events_url":"https://api.github.com/users/mpsnp/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T08:25:04Z","updated_at":"2018-07-20T08:25:04Z","author_association":"NONE","body":"I guess also this could be related to this issue, it adds blank line in place of comment in this example:\r\n\r\n```swift\r\n    static var reducer: Reducer<AccountState, Action> = .init { state, action in\r\n        // Some code here\r\n    }\r\n    // Swift format adds blank line here\r\n    <>\r\n    reduce(state: \\.signInOperation, action: Action.prism.signIn)\r\n```\r\n\r\nAs well as it breaks indentation here:\r\n\r\nBefore:\r\n```swift\r\n    static var reducer: Reducer<AppState, Action> =\r\n        reduce(state: \\.accountState, action: Action.prism.accountAction)\r\n        <>\r\n        reduce(state: \\.flightState, action: Action.prism.flightAction)\r\n        <>\r\n        reduce(state: \\.logbookState, action: Action.prism.logbookAction)\r\n        <>\r\n        reduce(state: \\.teamState, action: Action.prism.teamAction)\r\n```\r\n\r\nAfter:\r\n```swift\r\n    static var reducer: Reducer<AppState, Action> =\r\n        reduce(state: \\.accountState, action: Action.prism.accountAction)\r\n    <>\r\n    reduce(state: \\.flightState, action: Action.prism.flightAction)\r\n    <>\r\n    reduce(state: \\.logbookState, action: Action.prism.logbookAction)\r\n    <>\r\n    reduce(state: \\.teamState, action: Action.prism.teamAction)\r\n```"}}
{"actor":{"display_login":"mpsnp"}}