{"action":"created","comment":{"url":"https://api.github.com/repos/realm/SwiftLint/pulls/comments/90507515","pull_request_review_id":11026251,"id":90507515,"diff_hunk":"@@ -24,3 +24,26 @@ extension Array where Element: NSTextCheckingResult {\n         return map { $0.range }\n     }\n }\n+\n+extension Array where Element: Equatable {\n+    var unique: [Element] {\n+        var uniqueValues: [Element] = []\n+        forEach { item in\n+            if !uniqueValues.contains(item) {\n+                uniqueValues += [item]\n+            }\n+        }\n+        return uniqueValues\n+    }\n+}\n+\n+public extension SequenceType {\n+    func categorise<U: Hashable>(@noescape by transform: Generator.Element -> U) -> [U:[Generator.Element]] {\n+        var dictionary: [U:[Generator.Element]] = [:]","path":"Source/SwiftLintFramework/Extensions/Array+SwiftLint.swift","position":19,"original_position":19,"commit_id":"a86acd0b93258474fcc8ccb8123f5f3fe6bf7179","original_commit_id":"a86acd0b93258474fcc8ccb8123f5f3fe6bf7179","user":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"body":"we're in the process of adding a new rule requiring a space after the colon in dictionaries: `var dictionary = [U: [Generator.Element]]()`","created_at":"2016-12-01T18:30:04Z","updated_at":"2016-12-01T18:32:08Z","html_url":"https://github.com/realm/SwiftLint/pull/916#discussion_r90507515","pull_request_url":"https://api.github.com/repos/realm/SwiftLint/pulls/916","_links":{"self":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/comments/90507515"},"html":{"href":"https://github.com/realm/SwiftLint/pull/916#discussion_r90507515"},"pull_request":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/916"}}},"pull_request":{"url":"https://api.github.com/repos/realm/SwiftLint/pulls/916","id":96138520,"html_url":"https://github.com/realm/SwiftLint/pull/916","diff_url":"https://github.com/realm/SwiftLint/pull/916.diff","patch_url":"https://github.com/realm/SwiftLint/pull/916.patch","issue_url":"https://api.github.com/repos/realm/SwiftLint/issues/916","number":916,"state":"open","locked":false,"title":"Add human readable reporter that’s also funny because emoji.","user":{"login":"justMaku","id":2745656,"avatar_url":"https://avatars.githubusercontent.com/u/2745656?v=3","gravatar_id":"","url":"https://api.github.com/users/justMaku","html_url":"https://github.com/justMaku","followers_url":"https://api.github.com/users/justMaku/followers","following_url":"https://api.github.com/users/justMaku/following{/other_user}","gists_url":"https://api.github.com/users/justMaku/gists{/gist_id}","starred_url":"https://api.github.com/users/justMaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justMaku/subscriptions","organizations_url":"https://api.github.com/users/justMaku/orgs","repos_url":"https://api.github.com/users/justMaku/repos","events_url":"https://api.github.com/users/justMaku/events{/privacy}","received_events_url":"https://api.github.com/users/justMaku/received_events","type":"User","site_admin":false},"body":"This pull request adds a new reporter type that's much easier to read for human eye. I believe it could be useful for people that use swiftlint for example in a pre-commit hook or on CI.\r\n\r\n**Example:**\r\n```\r\n/Users/maku/Projects/Temp/Otter.swift\r\n⛔️ Line 159: Function should have complexity 10 or less: currently complexity equals 21\r\n⛔️ Line 185: Function should have complexity 10 or less: currently complexity equals 96\r\n⚠️ Line 12: Lines should not have trailing whitespace.\r\n⚠️ Line 18: Lines should not have trailing whitespace.\r\n⚠️ Line 115: Lines should not have trailing whitespace.\r\n\r\n/Users/maku/Projects/Temp/Other.swift\r\n⚠️ Line 23: Lines should not have trailing whitespace.\r\n⚠️ Line 69: Lines should not have trailing whitespace.\r\n⚠️ Line 92: Lines should not have trailing whitespace.\r\n```","created_at":"2016-12-01T17:55:45Z","updated_at":"2016-12-01T18:32:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12a27c84da3ac7b9fa767575d75bd8f4c27272f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/SwiftLint/pulls/916/commits","review_comments_url":"https://api.github.com/repos/realm/SwiftLint/pulls/916/comments","review_comment_url":"https://api.github.com/repos/realm/SwiftLint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/SwiftLint/issues/916/comments","statuses_url":"https://api.github.com/repos/realm/SwiftLint/statuses/a86acd0b93258474fcc8ccb8123f5f3fe6bf7179","head":{"label":"justMaku:feature/emoji_reporter","ref":"feature/emoji_reporter","sha":"a86acd0b93258474fcc8ccb8123f5f3fe6bf7179","user":{"login":"justMaku","id":2745656,"avatar_url":"https://avatars.githubusercontent.com/u/2745656?v=3","gravatar_id":"","url":"https://api.github.com/users/justMaku","html_url":"https://github.com/justMaku","followers_url":"https://api.github.com/users/justMaku/followers","following_url":"https://api.github.com/users/justMaku/following{/other_user}","gists_url":"https://api.github.com/users/justMaku/gists{/gist_id}","starred_url":"https://api.github.com/users/justMaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justMaku/subscriptions","organizations_url":"https://api.github.com/users/justMaku/orgs","repos_url":"https://api.github.com/users/justMaku/repos","events_url":"https://api.github.com/users/justMaku/events{/privacy}","received_events_url":"https://api.github.com/users/justMaku/received_events","type":"User","site_admin":false},"repo":{"id":63059072,"name":"SwiftLint","full_name":"justMaku/SwiftLint","owner":{"login":"justMaku","id":2745656,"avatar_url":"https://avatars.githubusercontent.com/u/2745656?v=3","gravatar_id":"","url":"https://api.github.com/users/justMaku","html_url":"https://github.com/justMaku","followers_url":"https://api.github.com/users/justMaku/followers","following_url":"https://api.github.com/users/justMaku/following{/other_user}","gists_url":"https://api.github.com/users/justMaku/gists{/gist_id}","starred_url":"https://api.github.com/users/justMaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justMaku/subscriptions","organizations_url":"https://api.github.com/users/justMaku/orgs","repos_url":"https://api.github.com/users/justMaku/repos","events_url":"https://api.github.com/users/justMaku/events{/privacy}","received_events_url":"https://api.github.com/users/justMaku/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/justMaku/SwiftLint","description":"A tool to enforce Swift style and conventions.","fork":true,"url":"https://api.github.com/repos/justMaku/SwiftLint","forks_url":"https://api.github.com/repos/justMaku/SwiftLint/forks","keys_url":"https://api.github.com/repos/justMaku/SwiftLint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/justMaku/SwiftLint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/justMaku/SwiftLint/teams","hooks_url":"https://api.github.com/repos/justMaku/SwiftLint/hooks","issue_events_url":"https://api.github.com/repos/justMaku/SwiftLint/issues/events{/number}","events_url":"https://api.github.com/repos/justMaku/SwiftLint/events","assignees_url":"https://api.github.com/repos/justMaku/SwiftLint/assignees{/user}","branches_url":"https://api.github.com/repos/justMaku/SwiftLint/branches{/branch}","tags_url":"https://api.github.com/repos/justMaku/SwiftLint/tags","blobs_url":"https://api.github.com/repos/justMaku/SwiftLint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/justMaku/SwiftLint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/justMaku/SwiftLint/git/refs{/sha}","trees_url":"https://api.github.com/repos/justMaku/SwiftLint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/justMaku/SwiftLint/statuses/{sha}","languages_url":"https://api.github.com/repos/justMaku/SwiftLint/languages","stargazers_url":"https://api.github.com/repos/justMaku/SwiftLint/stargazers","contributors_url":"https://api.github.com/repos/justMaku/SwiftLint/contributors","subscribers_url":"https://api.github.com/repos/justMaku/SwiftLint/subscribers","subscription_url":"https://api.github.com/repos/justMaku/SwiftLint/subscription","commits_url":"https://api.github.com/repos/justMaku/SwiftLint/commits{/sha}","git_commits_url":"https://api.github.com/repos/justMaku/SwiftLint/git/commits{/sha}","comments_url":"https://api.github.com/repos/justMaku/SwiftLint/comments{/number}","issue_comment_url":"https://api.github.com/repos/justMaku/SwiftLint/issues/comments{/number}","contents_url":"https://api.github.com/repos/justMaku/SwiftLint/contents/{+path}","compare_url":"https://api.github.com/repos/justMaku/SwiftLint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/justMaku/SwiftLint/merges","archive_url":"https://api.github.com/repos/justMaku/SwiftLint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/justMaku/SwiftLint/downloads","issues_url":"https://api.github.com/repos/justMaku/SwiftLint/issues{/number}","pulls_url":"https://api.github.com/repos/justMaku/SwiftLint/pulls{/number}","milestones_url":"https://api.github.com/repos/justMaku/SwiftLint/milestones{/number}","notifications_url":"https://api.github.com/repos/justMaku/SwiftLint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/justMaku/SwiftLint/labels{/name}","releases_url":"https://api.github.com/repos/justMaku/SwiftLint/releases{/id}","deployments_url":"https://api.github.com/repos/justMaku/SwiftLint/deployments","created_at":"2016-07-11T10:32:42Z","updated_at":"2016-07-11T10:32:43Z","pushed_at":"2016-12-01T17:55:21Z","git_url":"git://github.com/justMaku/SwiftLint.git","ssh_url":"git@github.com:justMaku/SwiftLint.git","clone_url":"https://github.com/justMaku/SwiftLint.git","svn_url":"https://github.com/justMaku/SwiftLint","homepage":"https://realm.io","size":1994,"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":"4bb82285d61509d98fbb991bd467f2781f5a5d08","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":"2016-12-01T16:14:23Z","pushed_at":"2016-12-01T17:55:45Z","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":2927,"stargazers_count":5209,"watchers_count":5209,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":377,"mirror_url":null,"open_issues_count":138,"forks":377,"open_issues":138,"watchers":5209,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/916"},"html":{"href":"https://github.com/realm/SwiftLint/pull/916"},"issue":{"href":"https://api.github.com/repos/realm/SwiftLint/issues/916"},"comments":{"href":"https://api.github.com/repos/realm/SwiftLint/issues/916/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/916/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/SwiftLint/pulls/916/commits"},"statuses":{"href":"https://api.github.com/repos/realm/SwiftLint/statuses/a86acd0b93258474fcc8ccb8123f5f3fe6bf7179"}}}}
{"actor":{"display_login":"jpsim"}}