{"action":"closed","number":1032,"pull_request":{"url":"https://api.github.com/repos/realm/SwiftLint/pulls/1032","id":99150204,"html_url":"https://github.com/realm/SwiftLint/pull/1032","diff_url":"https://github.com/realm/SwiftLint/pull/1032.diff","patch_url":"https://github.com/realm/SwiftLint/pull/1032.patch","issue_url":"https://api.github.com/repos/realm/SwiftLint/issues/1032","number":1032,"state":"closed","locked":false,"title":"Fix trailing_comma crash","user":{"login":"marcelofabri","id":833072,"avatar_url":"https://avatars.githubusercontent.com/u/833072?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelofabri","html_url":"https://github.com/marcelofabri","followers_url":"https://api.github.com/users/marcelofabri/followers","following_url":"https://api.github.com/users/marcelofabri/following{/other_user}","gists_url":"https://api.github.com/users/marcelofabri/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelofabri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelofabri/subscriptions","organizations_url":"https://api.github.com/users/marcelofabri/orgs","repos_url":"https://api.github.com/users/marcelofabri/repos","events_url":"https://api.github.com/users/marcelofabri/events{/privacy}","received_events_url":"https://api.github.com/users/marcelofabri/received_events","type":"User","site_admin":false},"body":"Fixes #921.\r\n\r\n~As I wasn't able to reproduce the issue, I'm not sure this actually fixes the problem, but it was the only reason I found to make `contents.substringWithByteRange(start: lastPosition, length: length)` crash.~\r\n\r\n~I'll add a changelog once we confirm it does fix the issue.~\r\n\r\n~If it does, it'd good to have someone to add a break point in this guard to try to understand the issue and create a reproducible case so we can add tests and make sure we don't introduce a regression in the future.~\r\n\r\n---\r\n\r\n**UPDATE**: See https://github.com/realm/SwiftLint/issues/921#issuecomment-269890556","created_at":"2016-12-22T18:32:52Z","updated_at":"2017-01-01T18:11:53Z","closed_at":"2017-01-01T18:11:53Z","merged_at":"2017-01-01T18:11:53Z","merge_commit_sha":"f9a75e54123162863c786ba2636243fb2a196f39","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/SwiftLint/pulls/1032/commits","review_comments_url":"https://api.github.com/repos/realm/SwiftLint/pulls/1032/comments","review_comment_url":"https://api.github.com/repos/realm/SwiftLint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/SwiftLint/issues/1032/comments","statuses_url":"https://api.github.com/repos/realm/SwiftLint/statuses/1a9d2ef7e6761c0af6acaa866181cda67fd6a49e","head":{"label":"marcelofabri:bugfix_921","ref":"bugfix_921","sha":"1a9d2ef7e6761c0af6acaa866181cda67fd6a49e","user":{"login":"marcelofabri","id":833072,"avatar_url":"https://avatars.githubusercontent.com/u/833072?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelofabri","html_url":"https://github.com/marcelofabri","followers_url":"https://api.github.com/users/marcelofabri/followers","following_url":"https://api.github.com/users/marcelofabri/following{/other_user}","gists_url":"https://api.github.com/users/marcelofabri/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelofabri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelofabri/subscriptions","organizations_url":"https://api.github.com/users/marcelofabri/orgs","repos_url":"https://api.github.com/users/marcelofabri/repos","events_url":"https://api.github.com/users/marcelofabri/events{/privacy}","received_events_url":"https://api.github.com/users/marcelofabri/received_events","type":"User","site_admin":false},"repo":{"id":66171616,"name":"SwiftLint","full_name":"marcelofabri/SwiftLint","owner":{"login":"marcelofabri","id":833072,"avatar_url":"https://avatars.githubusercontent.com/u/833072?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelofabri","html_url":"https://github.com/marcelofabri","followers_url":"https://api.github.com/users/marcelofabri/followers","following_url":"https://api.github.com/users/marcelofabri/following{/other_user}","gists_url":"https://api.github.com/users/marcelofabri/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelofabri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelofabri/subscriptions","organizations_url":"https://api.github.com/users/marcelofabri/orgs","repos_url":"https://api.github.com/users/marcelofabri/repos","events_url":"https://api.github.com/users/marcelofabri/events{/privacy}","received_events_url":"https://api.github.com/users/marcelofabri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marcelofabri/SwiftLint","description":"A tool to enforce Swift style and conventions.","fork":true,"url":"https://api.github.com/repos/marcelofabri/SwiftLint","forks_url":"https://api.github.com/repos/marcelofabri/SwiftLint/forks","keys_url":"https://api.github.com/repos/marcelofabri/SwiftLint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marcelofabri/SwiftLint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marcelofabri/SwiftLint/teams","hooks_url":"https://api.github.com/repos/marcelofabri/SwiftLint/hooks","issue_events_url":"https://api.github.com/repos/marcelofabri/SwiftLint/issues/events{/number}","events_url":"https://api.github.com/repos/marcelofabri/SwiftLint/events","assignees_url":"https://api.github.com/repos/marcelofabri/SwiftLint/assignees{/user}","branches_url":"https://api.github.com/repos/marcelofabri/SwiftLint/branches{/branch}","tags_url":"https://api.github.com/repos/marcelofabri/SwiftLint/tags","blobs_url":"https://api.github.com/repos/marcelofabri/SwiftLint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marcelofabri/SwiftLint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marcelofabri/SwiftLint/git/refs{/sha}","trees_url":"https://api.github.com/repos/marcelofabri/SwiftLint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marcelofabri/SwiftLint/statuses/{sha}","languages_url":"https://api.github.com/repos/marcelofabri/SwiftLint/languages","stargazers_url":"https://api.github.com/repos/marcelofabri/SwiftLint/stargazers","contributors_url":"https://api.github.com/repos/marcelofabri/SwiftLint/contributors","subscribers_url":"https://api.github.com/repos/marcelofabri/SwiftLint/subscribers","subscription_url":"https://api.github.com/repos/marcelofabri/SwiftLint/subscription","commits_url":"https://api.github.com/repos/marcelofabri/SwiftLint/commits{/sha}","git_commits_url":"https://api.github.com/repos/marcelofabri/SwiftLint/git/commits{/sha}","comments_url":"https://api.github.com/repos/marcelofabri/SwiftLint/comments{/number}","issue_comment_url":"https://api.github.com/repos/marcelofabri/SwiftLint/issues/comments{/number}","contents_url":"https://api.github.com/repos/marcelofabri/SwiftLint/contents/{+path}","compare_url":"https://api.github.com/repos/marcelofabri/SwiftLint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marcelofabri/SwiftLint/merges","archive_url":"https://api.github.com/repos/marcelofabri/SwiftLint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marcelofabri/SwiftLint/downloads","issues_url":"https://api.github.com/repos/marcelofabri/SwiftLint/issues{/number}","pulls_url":"https://api.github.com/repos/marcelofabri/SwiftLint/pulls{/number}","milestones_url":"https://api.github.com/repos/marcelofabri/SwiftLint/milestones{/number}","notifications_url":"https://api.github.com/repos/marcelofabri/SwiftLint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marcelofabri/SwiftLint/labels{/name}","releases_url":"https://api.github.com/repos/marcelofabri/SwiftLint/releases{/id}","deployments_url":"https://api.github.com/repos/marcelofabri/SwiftLint/deployments","created_at":"2016-08-20T22:57:09Z","updated_at":"2016-08-20T22:57:10Z","pushed_at":"2017-01-01T18:11:22Z","git_url":"git://github.com/marcelofabri/SwiftLint.git","ssh_url":"git@github.com:marcelofabri/SwiftLint.git","clone_url":"https://github.com/marcelofabri/SwiftLint.git","svn_url":"https://github.com/marcelofabri/SwiftLint","homepage":"https://realm.io","size":3124,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"6b2338ce787d2524998956f79d41fd9e9b7eaa7c","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":35732214,"name":"SwiftLint","full_name":"realm/SwiftLint","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/SwiftLint","description":"A tool to enforce Swift style and conventions.","fork":false,"url":"https://api.github.com/repos/realm/SwiftLint","forks_url":"https://api.github.com/repos/realm/SwiftLint/forks","keys_url":"https://api.github.com/repos/realm/SwiftLint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/SwiftLint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/SwiftLint/teams","hooks_url":"https://api.github.com/repos/realm/SwiftLint/hooks","issue_events_url":"https://api.github.com/repos/realm/SwiftLint/issues/events{/number}","events_url":"https://api.github.com/repos/realm/SwiftLint/events","assignees_url":"https://api.github.com/repos/realm/SwiftLint/assignees{/user}","branches_url":"https://api.github.com/repos/realm/SwiftLint/branches{/branch}","tags_url":"https://api.github.com/repos/realm/SwiftLint/tags","blobs_url":"https://api.github.com/repos/realm/SwiftLint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/SwiftLint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/SwiftLint/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/SwiftLint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/SwiftLint/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/SwiftLint/languages","stargazers_url":"https://api.github.com/repos/realm/SwiftLint/stargazers","contributors_url":"https://api.github.com/repos/realm/SwiftLint/contributors","subscribers_url":"https://api.github.com/repos/realm/SwiftLint/subscribers","subscription_url":"https://api.github.com/repos/realm/SwiftLint/subscription","commits_url":"https://api.github.com/repos/realm/SwiftLint/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/SwiftLint/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/SwiftLint/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/SwiftLint/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/SwiftLint/contents/{+path}","compare_url":"https://api.github.com/repos/realm/SwiftLint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/SwiftLint/merges","archive_url":"https://api.github.com/repos/realm/SwiftLint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/SwiftLint/downloads","issues_url":"https://api.github.com/repos/realm/SwiftLint/issues{/number}","pulls_url":"https://api.github.com/repos/realm/SwiftLint/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/SwiftLint/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/SwiftLint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/SwiftLint/labels{/name}","releases_url":"https://api.github.com/repos/realm/SwiftLint/releases{/id}","deployments_url":"https://api.github.com/repos/realm/SwiftLint/deployments","created_at":"2015-05-16T16:59:31Z","updated_at":"2017-01-01T08:09:32Z","pushed_at":"2017-01-01T18:11:53Z","git_url":"git://github.com/realm/SwiftLint.git","ssh_url":"git@github.com:realm/SwiftLint.git","clone_url":"https://github.com/realm/SwiftLint.git","svn_url":"https://github.com/realm/SwiftLint","homepage":"https://realm.io","size":3111,"stargazers_count":5449,"watchers_count":5449,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":408,"mirror_url":null,"open_issues_count":146,"forks":408,"open_issues":146,"watchers":5449,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/1032"},"html":{"href":"https://github.com/realm/SwiftLint/pull/1032"},"issue":{"href":"https://api.github.com/repos/realm/SwiftLint/issues/1032"},"comments":{"href":"https://api.github.com/repos/realm/SwiftLint/issues/1032/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/1032/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/1032/commits"},"statuses":{"href":"https://api.github.com/repos/realm/SwiftLint/statuses/1a9d2ef7e6761c0af6acaa866181cda67fd6a49e"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"marcelofabri","id":833072,"avatar_url":"https://avatars.githubusercontent.com/u/833072?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelofabri","html_url":"https://github.com/marcelofabri","followers_url":"https://api.github.com/users/marcelofabri/followers","following_url":"https://api.github.com/users/marcelofabri/following{/other_user}","gists_url":"https://api.github.com/users/marcelofabri/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelofabri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelofabri/subscriptions","organizations_url":"https://api.github.com/users/marcelofabri/orgs","repos_url":"https://api.github.com/users/marcelofabri/repos","events_url":"https://api.github.com/users/marcelofabri/events{/privacy}","received_events_url":"https://api.github.com/users/marcelofabri/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"marcelofabri"}}