{"action":"created","comment":{"url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/comments/74461978","id":74461978,"diff_hunk":"@@ -2718,24 +2718,33 @@ Translations of the guide are available in the following languages:\n   STATES = %i(draft open closed)\n   ```\n \n-* <a name=\"no-trailing-array-commas\"></a>\n-  Avoid comma after the last item of an `Array` or `Hash` literal, especially\n-  when the items are not on separate lines.\n-<sup>[[link](#no-trailing-array-commas)]</sup>\n+* <a name=\"trailing-array-hash-commas\"></a>\n+  Use a comma after the last item of an `Array` or `Hash` literal, especially\n+  when the items are on separate lines. This allows the move/add/remove of\n+  items in the structure without caring about the comma. It also leaves\n+  incidental change out of pull requests.\n+<sup>[[link](#trailing-array-hash-commas)]</sup>\n \n   ```Ruby\n-  # bad - easier to move/add/remove items, but still not preferred\n+  # good - easier to move/add/remove items\n   VALUES = [\n              1001,\n              2020,\n              3333,\n            ]\n \n-  # bad\n+  # ok\n   VALUES = [1001, 2020, 3333, ]","path":"README.md","position":26,"original_position":26,"commit_id":"d79c3c2174d33e2bb03bcc7d8085ddb0cf7ea225","original_commit_id":"d79c3c2174d33e2bb03bcc7d8085ddb0cf7ea225","user":{"login":"adkron","id":4253,"avatar_url":"https://avatars.githubusercontent.com/u/4253?v=3","gravatar_id":"","url":"https://api.github.com/users/adkron","html_url":"https://github.com/adkron","followers_url":"https://api.github.com/users/adkron/followers","following_url":"https://api.github.com/users/adkron/following{/other_user}","gists_url":"https://api.github.com/users/adkron/gists{/gist_id}","starred_url":"https://api.github.com/users/adkron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adkron/subscriptions","organizations_url":"https://api.github.com/users/adkron/orgs","repos_url":"https://api.github.com/users/adkron/repos","events_url":"https://api.github.com/users/adkron/events{/privacy}","received_events_url":"https://api.github.com/users/adkron/received_events","type":"User","site_admin":false},"body":"That is why I said `ok` instead of good, but I probably shouldn't have made the one below say `bad`. It still makes change simpler by having a trailing comma, but it makes less difference. If you want to expand to multiline it is one less change.","created_at":"2016-08-11T17:06:34Z","updated_at":"2016-08-11T17:06:34Z","html_url":"https://github.com/procore/ruby-style-guide/pull/5#discussion_r74461978","pull_request_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/comments/74461978"},"html":{"href":"https://github.com/procore/ruby-style-guide/pull/5#discussion_r74461978"},"pull_request":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5","id":80969544,"html_url":"https://github.com/procore/ruby-style-guide/pull/5","diff_url":"https://github.com/procore/ruby-style-guide/pull/5.diff","patch_url":"https://github.com/procore/ruby-style-guide/pull/5.patch","issue_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/5","number":5,"state":"open","locked":false,"title":"User trailing commas to allow for simpler refactors","user":{"login":"adkron","id":4253,"avatar_url":"https://avatars.githubusercontent.com/u/4253?v=3","gravatar_id":"","url":"https://api.github.com/users/adkron","html_url":"https://github.com/adkron","followers_url":"https://api.github.com/users/adkron/followers","following_url":"https://api.github.com/users/adkron/following{/other_user}","gists_url":"https://api.github.com/users/adkron/gists{/gist_id}","starred_url":"https://api.github.com/users/adkron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adkron/subscriptions","organizations_url":"https://api.github.com/users/adkron/orgs","repos_url":"https://api.github.com/users/adkron/repos","events_url":"https://api.github.com/users/adkron/events{/privacy}","received_events_url":"https://api.github.com/users/adkron/received_events","type":"User","site_admin":false},"body":"Using a trailing comma in a hash or array allows for items in the structure\r\nto be arranged without worrying about the comma. The last item can be\r\nremoved without the worry of the comma above still being there.\r\n\r\nWhen looking at a PR there will be one less line changed when adding/removing\r\nan item. This will allow the PR to have more focus and less mental cognitive noise.\r\n\r\nAmos King @adkron <amos@binarynoggin.com>","created_at":"2016-08-11T14:41:02Z","updated_at":"2016-08-11T17:06:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b926e3c17ec393cd34938c9dea9a782e9d74d7ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5/commits","review_comments_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5/comments","review_comment_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/5/comments","statuses_url":"https://api.github.com/repos/procore/ruby-style-guide/statuses/d79c3c2174d33e2bb03bcc7d8085ddb0cf7ea225","head":{"label":"procore:trailing-commas","ref":"trailing-commas","sha":"d79c3c2174d33e2bb03bcc7d8085ddb0cf7ea225","user":{"login":"procore","id":145387,"avatar_url":"https://avatars.githubusercontent.com/u/145387?v=3","gravatar_id":"","url":"https://api.github.com/users/procore","html_url":"https://github.com/procore","followers_url":"https://api.github.com/users/procore/followers","following_url":"https://api.github.com/users/procore/following{/other_user}","gists_url":"https://api.github.com/users/procore/gists{/gist_id}","starred_url":"https://api.github.com/users/procore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procore/subscriptions","organizations_url":"https://api.github.com/users/procore/orgs","repos_url":"https://api.github.com/users/procore/repos","events_url":"https://api.github.com/users/procore/events{/privacy}","received_events_url":"https://api.github.com/users/procore/received_events","type":"Organization","site_admin":false},"repo":{"id":23597164,"name":"ruby-style-guide","full_name":"procore/ruby-style-guide","owner":{"login":"procore","id":145387,"avatar_url":"https://avatars.githubusercontent.com/u/145387?v=3","gravatar_id":"","url":"https://api.github.com/users/procore","html_url":"https://github.com/procore","followers_url":"https://api.github.com/users/procore/followers","following_url":"https://api.github.com/users/procore/following{/other_user}","gists_url":"https://api.github.com/users/procore/gists{/gist_id}","starred_url":"https://api.github.com/users/procore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procore/subscriptions","organizations_url":"https://api.github.com/users/procore/orgs","repos_url":"https://api.github.com/users/procore/repos","events_url":"https://api.github.com/users/procore/events{/privacy}","received_events_url":"https://api.github.com/users/procore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/procore/ruby-style-guide","description":"A community-driven Ruby coding style guide","fork":true,"url":"https://api.github.com/repos/procore/ruby-style-guide","forks_url":"https://api.github.com/repos/procore/ruby-style-guide/forks","keys_url":"https://api.github.com/repos/procore/ruby-style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/procore/ruby-style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/procore/ruby-style-guide/teams","hooks_url":"https://api.github.com/repos/procore/ruby-style-guide/hooks","issue_events_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/procore/ruby-style-guide/events","assignees_url":"https://api.github.com/repos/procore/ruby-style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/procore/ruby-style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/procore/ruby-style-guide/tags","blobs_url":"https://api.github.com/repos/procore/ruby-style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/procore/ruby-style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/procore/ruby-style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/procore/ruby-style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/procore/ruby-style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/procore/ruby-style-guide/languages","stargazers_url":"https://api.github.com/repos/procore/ruby-style-guide/stargazers","contributors_url":"https://api.github.com/repos/procore/ruby-style-guide/contributors","subscribers_url":"https://api.github.com/repos/procore/ruby-style-guide/subscribers","subscription_url":"https://api.github.com/repos/procore/ruby-style-guide/subscription","commits_url":"https://api.github.com/repos/procore/ruby-style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/procore/ruby-style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/procore/ruby-style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/procore/ruby-style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/procore/ruby-style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/procore/ruby-style-guide/merges","archive_url":"https://api.github.com/repos/procore/ruby-style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/procore/ruby-style-guide/downloads","issues_url":"https://api.github.com/repos/procore/ruby-style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/procore/ruby-style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/procore/ruby-style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/procore/ruby-style-guide/labels{/name}","releases_url":"https://api.github.com/repos/procore/ruby-style-guide/releases{/id}","deployments_url":"https://api.github.com/repos/procore/ruby-style-guide/deployments","created_at":"2014-09-02T21:59:30Z","updated_at":"2016-05-31T21:11:20Z","pushed_at":"2016-08-11T14:41:03Z","git_url":"git://github.com/procore/ruby-style-guide.git","ssh_url":"git@github.com:procore/ruby-style-guide.git","clone_url":"https://github.com/procore/ruby-style-guide.git","svn_url":"https://github.com/procore/ruby-style-guide","homepage":"","size":479,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"procore:master","ref":"master","sha":"b3d3c0ad63851e75655bd4a6f5d8b6e9a04a9421","user":{"login":"procore","id":145387,"avatar_url":"https://avatars.githubusercontent.com/u/145387?v=3","gravatar_id":"","url":"https://api.github.com/users/procore","html_url":"https://github.com/procore","followers_url":"https://api.github.com/users/procore/followers","following_url":"https://api.github.com/users/procore/following{/other_user}","gists_url":"https://api.github.com/users/procore/gists{/gist_id}","starred_url":"https://api.github.com/users/procore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procore/subscriptions","organizations_url":"https://api.github.com/users/procore/orgs","repos_url":"https://api.github.com/users/procore/repos","events_url":"https://api.github.com/users/procore/events{/privacy}","received_events_url":"https://api.github.com/users/procore/received_events","type":"Organization","site_admin":false},"repo":{"id":23597164,"name":"ruby-style-guide","full_name":"procore/ruby-style-guide","owner":{"login":"procore","id":145387,"avatar_url":"https://avatars.githubusercontent.com/u/145387?v=3","gravatar_id":"","url":"https://api.github.com/users/procore","html_url":"https://github.com/procore","followers_url":"https://api.github.com/users/procore/followers","following_url":"https://api.github.com/users/procore/following{/other_user}","gists_url":"https://api.github.com/users/procore/gists{/gist_id}","starred_url":"https://api.github.com/users/procore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/procore/subscriptions","organizations_url":"https://api.github.com/users/procore/orgs","repos_url":"https://api.github.com/users/procore/repos","events_url":"https://api.github.com/users/procore/events{/privacy}","received_events_url":"https://api.github.com/users/procore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/procore/ruby-style-guide","description":"A community-driven Ruby coding style guide","fork":true,"url":"https://api.github.com/repos/procore/ruby-style-guide","forks_url":"https://api.github.com/repos/procore/ruby-style-guide/forks","keys_url":"https://api.github.com/repos/procore/ruby-style-guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/procore/ruby-style-guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/procore/ruby-style-guide/teams","hooks_url":"https://api.github.com/repos/procore/ruby-style-guide/hooks","issue_events_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/events{/number}","events_url":"https://api.github.com/repos/procore/ruby-style-guide/events","assignees_url":"https://api.github.com/repos/procore/ruby-style-guide/assignees{/user}","branches_url":"https://api.github.com/repos/procore/ruby-style-guide/branches{/branch}","tags_url":"https://api.github.com/repos/procore/ruby-style-guide/tags","blobs_url":"https://api.github.com/repos/procore/ruby-style-guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/procore/ruby-style-guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/procore/ruby-style-guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/procore/ruby-style-guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/procore/ruby-style-guide/statuses/{sha}","languages_url":"https://api.github.com/repos/procore/ruby-style-guide/languages","stargazers_url":"https://api.github.com/repos/procore/ruby-style-guide/stargazers","contributors_url":"https://api.github.com/repos/procore/ruby-style-guide/contributors","subscribers_url":"https://api.github.com/repos/procore/ruby-style-guide/subscribers","subscription_url":"https://api.github.com/repos/procore/ruby-style-guide/subscription","commits_url":"https://api.github.com/repos/procore/ruby-style-guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/procore/ruby-style-guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/procore/ruby-style-guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/procore/ruby-style-guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/procore/ruby-style-guide/contents/{+path}","compare_url":"https://api.github.com/repos/procore/ruby-style-guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/procore/ruby-style-guide/merges","archive_url":"https://api.github.com/repos/procore/ruby-style-guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/procore/ruby-style-guide/downloads","issues_url":"https://api.github.com/repos/procore/ruby-style-guide/issues{/number}","pulls_url":"https://api.github.com/repos/procore/ruby-style-guide/pulls{/number}","milestones_url":"https://api.github.com/repos/procore/ruby-style-guide/milestones{/number}","notifications_url":"https://api.github.com/repos/procore/ruby-style-guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/procore/ruby-style-guide/labels{/name}","releases_url":"https://api.github.com/repos/procore/ruby-style-guide/releases{/id}","deployments_url":"https://api.github.com/repos/procore/ruby-style-guide/deployments","created_at":"2014-09-02T21:59:30Z","updated_at":"2016-05-31T21:11:20Z","pushed_at":"2016-08-11T14:41:03Z","git_url":"git://github.com/procore/ruby-style-guide.git","ssh_url":"git@github.com:procore/ruby-style-guide.git","clone_url":"https://github.com/procore/ruby-style-guide.git","svn_url":"https://github.com/procore/ruby-style-guide","homepage":"","size":479,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5"},"html":{"href":"https://github.com/procore/ruby-style-guide/pull/5"},"issue":{"href":"https://api.github.com/repos/procore/ruby-style-guide/issues/5"},"comments":{"href":"https://api.github.com/repos/procore/ruby-style-guide/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/procore/ruby-style-guide/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/procore/ruby-style-guide/statuses/d79c3c2174d33e2bb03bcc7d8085ddb0cf7ea225"}}}}
{"actor":{"display_login":"adkron"}}