{"action":"created","issue":{"url":"https://api.github.com/repos/scalameta/scalafmt/issues/1325","repository_url":"https://api.github.com/repos/scalameta/scalafmt","labels_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1325/labels{/name}","comments_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1325/comments","events_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1325/events","html_url":"https://github.com/scalameta/scalafmt/issues/1325","id":390839447,"node_id":"MDU6SXNzdWUzOTA4Mzk0NDc=","number":1325,"title":"[bug] formatting with comment on the same line breaks the code","user":{"login":"wisechengyi","id":596358,"node_id":"MDQ6VXNlcjU5NjM1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/596358?v=4","gravatar_id":"","url":"https://api.github.com/users/wisechengyi","html_url":"https://github.com/wisechengyi","followers_url":"https://api.github.com/users/wisechengyi/followers","following_url":"https://api.github.com/users/wisechengyi/following{/other_user}","gists_url":"https://api.github.com/users/wisechengyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wisechengyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisechengyi/subscriptions","organizations_url":"https://api.github.com/users/wisechengyi/orgs","repos_url":"https://api.github.com/users/wisechengyi/repos","events_url":"https://api.github.com/users/wisechengyi/events{/privacy}","received_events_url":"https://api.github.com/users/wisechengyi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-13T20:07:44Z","updated_at":"2018-12-30T20:10:56Z","closed_at":null,"author_association":"NONE","body":"- **Version**: 1.5.1\r\n- **Integration**: CLI\r\n- **Configuration**:\r\n\r\n```\r\nmaxColumn = 100\r\n\r\ndocstrings = JavaDoc\r\n\r\nassumeStandardLibraryStripMargin = false\r\n\r\nalign = none\r\n\r\ncontinuationIndent.callSite = 2\r\ncontinuationIndent.defnSite = 2\r\n\r\ndanglingParentheses = false\r\n# We're willing to take as long as needed in nested code rather than bailing.\r\n# Empirical testing on all of source shows that this takes seconds, not minutes, per file.\r\nrunner.optimizer.escapeInPathologicalCases = false\r\n\r\nspaces.inImportCurlyBraces = false\r\nspaces.afterTripleEquals = true\r\n\r\nbinPack.parentConstructors = false\r\n```\r\n\r\n## Steps\r\n\r\nGiven code like this:\r\n```scala\r\n  case class test(\r\n    env: Map[String, String] = Map.empty // a comment\r\n  ) {\r\n    \r\n  }\r\n```\r\n\r\nWhen I run scalafmt like this:\r\n\r\n```bash\r\nscalafmt -c <pasted conf> <pastsed code> \r\n```\r\n## Problem\r\n\r\nScalafmt formats code like this:\r\n```scala\r\ncase class test(\r\n  env: Map[String, String] = Map.empty // to support recursive types) {}\r\n```\r\nIt breaks the code because everything after `//` is considered as comment.\r\n\r\n## Expectation\r\n\r\nCode doesn't break.\r\n\r\n## Workaround\r\n\r\nMove comment to the a separate line before\r\n"},"comment":{"url":"https://api.github.com/repos/scalameta/scalafmt/issues/comments/450583698","html_url":"https://github.com/scalameta/scalafmt/issues/1325#issuecomment-450583698","issue_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1325","id":450583698,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDU4MzY5OA==","user":{"login":"wisechengyi","id":596358,"node_id":"MDQ6VXNlcjU5NjM1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/596358?v=4","gravatar_id":"","url":"https://api.github.com/users/wisechengyi","html_url":"https://github.com/wisechengyi","followers_url":"https://api.github.com/users/wisechengyi/followers","following_url":"https://api.github.com/users/wisechengyi/following{/other_user}","gists_url":"https://api.github.com/users/wisechengyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wisechengyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisechengyi/subscriptions","organizations_url":"https://api.github.com/users/wisechengyi/orgs","repos_url":"https://api.github.com/users/wisechengyi/repos","events_url":"https://api.github.com/users/wisechengyi/events{/privacy}","received_events_url":"https://api.github.com/users/wisechengyi/received_events","type":"User","site_admin":false},"created_at":"2018-12-30T20:10:56Z","updated_at":"2018-12-30T20:10:56Z","author_association":"NONE","body":"Hmm that should be it.. maybe I can check if the behavior is consistent in docker.."}}
{"actor":{"display_login":"wisechengyi"}}