{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/linter/issues/249","repository_url":"https://api.github.com/repos/dart-lang/linter","labels_url":"https://api.github.com/repos/dart-lang/linter/issues/249/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/linter/issues/249/comments","events_url":"https://api.github.com/repos/dart-lang/linter/issues/249/events","html_url":"https://github.com/dart-lang/linter/issues/249","id":156606287,"number":249,"title":"Linter should suggest having a space on either side of any binary operators, and before any unary operators","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/linter/labels/Customer-Flutter","name":"Customer-Flutter","color":"bfd4f2"},{"url":"https://api.github.com/repos/dart-lang/linter/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dart-lang/linter/labels/lint%20request","name":"lint request","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-24T20:52:27Z","updated_at":"2016-05-25T13:54:35Z","closed_at":null,"body":"This code shows why you might care:\r\n```dart\r\nvoid main() {\r\n  print(5 ~/ 10); // prints the result of integer divining five by ten\r\n  print(5 /~ 10); // prints the result of dividing five by the bitwise-complement of ten\r\n  int x = 10;\r\n  x += 1; // adds one to x\r\n  x =+ 1; // sets x to one\r\n}\r\n```\r\n\r\nWith the suggested lint, the following code would be ok:\r\n```dart\r\nvoid main() {\r\n  print(5 ~/ 10);\r\n  print(5 / ~10);\r\n  int x = 10;\r\n  x += 1;\r\n  x = +1;\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/linter/issues/comments/221583336","html_url":"https://github.com/dart-lang/linter/issues/249#issuecomment-221583336","issue_url":"https://api.github.com/repos/dart-lang/linter/issues/249","id":221583336,"user":{"login":"pq","id":67586,"avatar_url":"https://avatars.githubusercontent.com/u/67586?v=3","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T13:54:34Z","updated_at":"2016-05-25T13:54:34Z","body":"> Shouldn't this be handled by dartfmt?\r\n\r\nIn general, yes.  However, some folks don't use it.  (Specifically, [flutter](https://flutter.io/style-guide/#formatting).)"}}
{"actor":{"display_login":"pq"}}