{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/26706","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/26706/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/26706/comments","events_url":"https://api.github.com/repos/golang/go/issues/26706/events","html_url":"https://github.com/golang/go/issues/26706","id":346134324,"node_id":"MDU6SXNzdWUzNDYxMzQzMjQ=","number":26706,"title":"cmd/gofmt: Remove redundant parenthesis in foo = (1 << 42)","user":{"login":"RalphCorderoy","id":2013707,"node_id":"MDQ6VXNlcjIwMTM3MDc=","avatar_url":"https://avatars0.githubusercontent.com/u/2013707?v=4","gravatar_id":"","url":"https://api.github.com/users/RalphCorderoy","html_url":"https://github.com/RalphCorderoy","followers_url":"https://api.github.com/users/RalphCorderoy/followers","following_url":"https://api.github.com/users/RalphCorderoy/following{/other_user}","gists_url":"https://api.github.com/users/RalphCorderoy/gists{/gist_id}","starred_url":"https://api.github.com/users/RalphCorderoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalphCorderoy/subscriptions","organizations_url":"https://api.github.com/users/RalphCorderoy/orgs","repos_url":"https://api.github.com/users/RalphCorderoy/repos","events_url":"https://api.github.com/users/RalphCorderoy/events{/privacy}","received_events_url":"https://api.github.com/users/RalphCorderoy/received_events","type":"User","site_admin":false},"labels":[{"id":373540105,"node_id":"MDU6TGFiZWwzNzM1NDAxMDU=","url":"https://api.github.com/repos/golang/go/labels/FeatureRequest","name":"FeatureRequest","color":"bfd4f2","default":false},{"id":373402289,"node_id":"MDU6TGFiZWwzNzM0MDIyODk=","url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestone/6","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"node_id":"MDk6TWlsZXN0b25lMTA1NTE0MQ==","number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1716,"closed_issues":1132,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2018-07-31T15:03:18Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":4,"created_at":"2018-07-31T10:49:28Z","updated_at":"2018-07-31T23:24:42Z","closed_at":null,"author_association":"NONE","body":"go version go1.10.3 linux/amd64\r\n\r\nReviewing CLs showed lists of const bit-masks that were foo = 1 << 42, etc., all had redundant parenthesis around the (1 << 42).  The author said they were copying similar ones in existing source.  gofmt doesn't remove them.  It does remove the outer pair of double ones, i.e. ((1 << 314)) in https://play.golang.org/p/V6jz7iKHJwt\r\n\r\nI think simple cases like foo = (1 << 42) can always have them removed.  That's the style followed by most of the stdlib, but not all.  Having pointed it out on the CL, Martin Möhrmann is fixing those other cases that influenced the author, e.g. https://go-review.googlesource.com/126775, but it would be nice if gofmt avoided the possibility."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/409399586","html_url":"https://github.com/golang/go/issues/26706#issuecomment-409399586","issue_url":"https://api.github.com/repos/golang/go/issues/26706","id":409399586,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTM5OTU4Ng==","user":{"login":"ianlancetaylor","id":3194333,"node_id":"MDQ6VXNlcjMxOTQzMzM=","avatar_url":"https://avatars2.githubusercontent.com/u/3194333?v=4","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T23:24:42Z","updated_at":"2018-07-31T23:24:42Z","author_association":"CONTRIBUTOR","body":"I agree that this could be done if the `-s` option is given, but not otherwise."}}
{"actor":{"display_login":"ianlancetaylor"}}