{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/dart_style/issues/34","labels_url":"https://api.github.com/repos/dart-lang/dart_style/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/dart_style/issues/34/comments","events_url":"https://api.github.com/repos/dart-lang/dart_style/issues/34/events","html_url":"https://github.com/dart-lang/dart_style/issues/34","id":48327704,"number":34,"title":"switch statements can get much longer/harder to read","user":{"login":"alan-knight","id":3476088,"avatar_url":"https://avatars.githubusercontent.com/u/3476088?v=3","gravatar_id":"","url":"https://api.github.com/users/alan-knight","html_url":"https://github.com/alan-knight","followers_url":"https://api.github.com/users/alan-knight/followers","following_url":"https://api.github.com/users/alan-knight/following{/other_user}","gists_url":"https://api.github.com/users/alan-knight/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-knight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-knight/subscriptions","organizations_url":"https://api.github.com/users/alan-knight/orgs","repos_url":"https://api.github.com/users/alan-knight/repos","events_url":"https://api.github.com/users/alan-knight/events{/privacy}","received_events_url":"https://api.github.com/users/alan-knight/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/dart_style/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-10T23:21:37Z","updated_at":"2015-01-14T18:25:18Z","closed_at":null,"body":"Hard to make a general rule, but I had\r\n```\r\n     switch (pattern[0]) {\r\n      case 'a': return formatAmPm(date);\r\n      case 'c': return formatStandaloneDay(date);\r\n      case 'd': return formatDayOfMonth(date);\r\n      case 'D': return formatDayOfYear(date);\r\n      ...\r\n```\r\nand it turns into \r\n```\r\n   switch (pattern[0]) {\r\n      case 'a':\r\n        return formatAmPm(date);\r\n      case 'c':\r\n        return formatStandaloneDay(date);\r\n      case 'd':\r\n        return formatDayOfMonth(date);\r\n      case 'D':\r\n        return formatDayOfYear(date);\r\n```\r\nwhere it's both longer and harder to see at a glance what the cases are."},"comment":{"url":"https://api.github.com/repos/dart-lang/dart_style/issues/comments/69964721","html_url":"https://github.com/dart-lang/dart_style/issues/34#issuecomment-69964721","issue_url":"https://api.github.com/repos/dart-lang/dart_style/issues/34","id":69964721,"user":{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T18:25:18Z","updated_at":"2015-01-14T18:25:18Z","body":"Another:\r\n\r\n```dart\r\n      switch (match.group(0)) {\r\n        case \"\\n\" : return r\"\\n\";\r\n        case \"\\\"\" : return r'\\\"';\r\n        case \"\\b\" : return r\"\\b\";\r\n        case \"\\t\" : return r\"\\t\";\r\n        case \"\\f\" : return r\"\\f\";\r\n        case \"\\v\" : return r\"\\v\";\r\n      }\r\n```\r\n\r\n```dart\r\n      switch (match.group(0)) {\r\n        case \"\\n\":\r\n          return r\"\\n\";\r\n        case \"\\\"\":\r\n          return r'\\\"';\r\n        case \"\\b\":\r\n          return r\"\\b\";\r\n        case \"\\t\":\r\n          return r\"\\t\";\r\n        case \"\\f\":\r\n          return r\"\\f\";\r\n        case \"\\v\":\r\n          return r\"\\v\";\r\n      }\r\n```"}}