{"action":"created","comment":{"url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/comments/37263615","id":37263615,"diff_hunk":"@@ -151,6 +151,18 @@ extension NSString {\n \n extension String {\n     /**\n+    Returns an array of Lines for each line in the file\n+    */\n+    internal func lines() -> [Line] {\n+        var lines = [Line]()\n+        var lineIndex = 1\n+        enumerateLines { line, _ in\n+            lines.append((lineIndex++, line))\n+        }\n+        return []","path":"Source/SourceKittenFramework/String+SourceKitten.swift","position":12,"original_position":12,"commit_id":"bde49b7c72f3c9d4b75b987c45c6b6222789ac98","original_commit_id":"bde49b7c72f3c9d4b75b987c45c6b6222789ac98","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":"`return lines`","created_at":"2015-08-18T04:38:45Z","updated_at":"2015-08-18T04:38:45Z","html_url":"https://github.com/jpsim/SourceKitten/pull/60#discussion_r37263615","pull_request_url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/comments/37263615"},"html":{"href":"https://github.com/jpsim/SourceKitten/pull/60#discussion_r37263615"},"pull_request":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60","id":42513256,"html_url":"https://github.com/jpsim/SourceKitten/pull/60","diff_url":"https://github.com/jpsim/SourceKitten/pull/60.diff","patch_url":"https://github.com/jpsim/SourceKitten/pull/60.patch","issue_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/60","number":60,"state":"open","locked":false,"title":"Add File lines convenience method","user":{"login":"keith","id":283886,"avatar_url":"https://avatars.githubusercontent.com/u/283886?v=3","gravatar_id":"","url":"https://api.github.com/users/keith","html_url":"https://github.com/keith","followers_url":"https://api.github.com/users/keith/followers","following_url":"https://api.github.com/users/keith/following{/other_user}","gists_url":"https://api.github.com/users/keith/gists{/gist_id}","starred_url":"https://api.github.com/users/keith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keith/subscriptions","organizations_url":"https://api.github.com/users/keith/orgs","repos_url":"https://api.github.com/users/keith/repos","events_url":"https://api.github.com/users/keith/events{/privacy}","received_events_url":"https://api.github.com/users/keith/received_events","type":"User","site_admin":false},"body":"This adds a lines accessory to File. This can be useful if you want to iterate over all lines in the file multiple times.\r\n\r\nThis will be super useful in [SwiftLint](https://github.com/realm/SwiftLint) where the same file is being used over and over and the contents of that file are broken into these lines many times. If this PR looks good I'll submit one to SwiftLint with the necessary changes.\r\n\r\nThe one downside to this is the file needs to be a `var` since this property is lazy. I think that is preferred over setting the lines for every file since they won't always be used.","created_at":"2015-08-15T03:59:32Z","updated_at":"2015-08-18T04:38:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60835cf33c8b49692d38a9b77311e339985e0127","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60/commits","review_comments_url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60/comments","review_comment_url":"https://api.github.com/repos/jpsim/SourceKitten/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/60/comments","statuses_url":"https://api.github.com/repos/jpsim/SourceKitten/statuses/bde49b7c72f3c9d4b75b987c45c6b6222789ac98","head":{"label":"keith:ks-file-lines","ref":"ks-file-lines","sha":"bde49b7c72f3c9d4b75b987c45c6b6222789ac98","user":{"login":"keith","id":283886,"avatar_url":"https://avatars.githubusercontent.com/u/283886?v=3","gravatar_id":"","url":"https://api.github.com/users/keith","html_url":"https://github.com/keith","followers_url":"https://api.github.com/users/keith/followers","following_url":"https://api.github.com/users/keith/following{/other_user}","gists_url":"https://api.github.com/users/keith/gists{/gist_id}","starred_url":"https://api.github.com/users/keith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keith/subscriptions","organizations_url":"https://api.github.com/users/keith/orgs","repos_url":"https://api.github.com/users/keith/repos","events_url":"https://api.github.com/users/keith/events{/privacy}","received_events_url":"https://api.github.com/users/keith/received_events","type":"User","site_admin":false},"repo":{"id":40745764,"name":"SourceKitten","full_name":"keith/SourceKitten","owner":{"login":"keith","id":283886,"avatar_url":"https://avatars.githubusercontent.com/u/283886?v=3","gravatar_id":"","url":"https://api.github.com/users/keith","html_url":"https://github.com/keith","followers_url":"https://api.github.com/users/keith/followers","following_url":"https://api.github.com/users/keith/following{/other_user}","gists_url":"https://api.github.com/users/keith/gists{/gist_id}","starred_url":"https://api.github.com/users/keith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keith/subscriptions","organizations_url":"https://api.github.com/users/keith/orgs","repos_url":"https://api.github.com/users/keith/repos","events_url":"https://api.github.com/users/keith/events{/privacy}","received_events_url":"https://api.github.com/users/keith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keith/SourceKitten","description":"An adorable little framework and command line tool for interacting with SourceKit.","fork":true,"url":"https://api.github.com/repos/keith/SourceKitten","forks_url":"https://api.github.com/repos/keith/SourceKitten/forks","keys_url":"https://api.github.com/repos/keith/SourceKitten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keith/SourceKitten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keith/SourceKitten/teams","hooks_url":"https://api.github.com/repos/keith/SourceKitten/hooks","issue_events_url":"https://api.github.com/repos/keith/SourceKitten/issues/events{/number}","events_url":"https://api.github.com/repos/keith/SourceKitten/events","assignees_url":"https://api.github.com/repos/keith/SourceKitten/assignees{/user}","branches_url":"https://api.github.com/repos/keith/SourceKitten/branches{/branch}","tags_url":"https://api.github.com/repos/keith/SourceKitten/tags","blobs_url":"https://api.github.com/repos/keith/SourceKitten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keith/SourceKitten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keith/SourceKitten/git/refs{/sha}","trees_url":"https://api.github.com/repos/keith/SourceKitten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keith/SourceKitten/statuses/{sha}","languages_url":"https://api.github.com/repos/keith/SourceKitten/languages","stargazers_url":"https://api.github.com/repos/keith/SourceKitten/stargazers","contributors_url":"https://api.github.com/repos/keith/SourceKitten/contributors","subscribers_url":"https://api.github.com/repos/keith/SourceKitten/subscribers","subscription_url":"https://api.github.com/repos/keith/SourceKitten/subscription","commits_url":"https://api.github.com/repos/keith/SourceKitten/commits{/sha}","git_commits_url":"https://api.github.com/repos/keith/SourceKitten/git/commits{/sha}","comments_url":"https://api.github.com/repos/keith/SourceKitten/comments{/number}","issue_comment_url":"https://api.github.com/repos/keith/SourceKitten/issues/comments{/number}","contents_url":"https://api.github.com/repos/keith/SourceKitten/contents/{+path}","compare_url":"https://api.github.com/repos/keith/SourceKitten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keith/SourceKitten/merges","archive_url":"https://api.github.com/repos/keith/SourceKitten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keith/SourceKitten/downloads","issues_url":"https://api.github.com/repos/keith/SourceKitten/issues{/number}","pulls_url":"https://api.github.com/repos/keith/SourceKitten/pulls{/number}","milestones_url":"https://api.github.com/repos/keith/SourceKitten/milestones{/number}","notifications_url":"https://api.github.com/repos/keith/SourceKitten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keith/SourceKitten/labels{/name}","releases_url":"https://api.github.com/repos/keith/SourceKitten/releases{/id}","created_at":"2015-08-15T03:53:11Z","updated_at":"2015-08-15T06:38:40Z","pushed_at":"2015-08-15T03:57:53Z","git_url":"git://github.com/keith/SourceKitten.git","ssh_url":"git@github.com:keith/SourceKitten.git","clone_url":"https://github.com/keith/SourceKitten.git","svn_url":"https://github.com/keith/SourceKitten","homepage":"","size":3938,"stargazers_count":1,"watchers_count":1,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jpsim:master","ref":"master","sha":"4274b8b6e8d11d8e6568a328d4c67798a9018332","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},"repo":{"id":23049318,"name":"SourceKitten","full_name":"jpsim/SourceKitten","owner":{"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},"private":false,"html_url":"https://github.com/jpsim/SourceKitten","description":"An adorable little framework and command line tool for interacting with SourceKit.","fork":false,"url":"https://api.github.com/repos/jpsim/SourceKitten","forks_url":"https://api.github.com/repos/jpsim/SourceKitten/forks","keys_url":"https://api.github.com/repos/jpsim/SourceKitten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpsim/SourceKitten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpsim/SourceKitten/teams","hooks_url":"https://api.github.com/repos/jpsim/SourceKitten/hooks","issue_events_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/events{/number}","events_url":"https://api.github.com/repos/jpsim/SourceKitten/events","assignees_url":"https://api.github.com/repos/jpsim/SourceKitten/assignees{/user}","branches_url":"https://api.github.com/repos/jpsim/SourceKitten/branches{/branch}","tags_url":"https://api.github.com/repos/jpsim/SourceKitten/tags","blobs_url":"https://api.github.com/repos/jpsim/SourceKitten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpsim/SourceKitten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpsim/SourceKitten/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpsim/SourceKitten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpsim/SourceKitten/statuses/{sha}","languages_url":"https://api.github.com/repos/jpsim/SourceKitten/languages","stargazers_url":"https://api.github.com/repos/jpsim/SourceKitten/stargazers","contributors_url":"https://api.github.com/repos/jpsim/SourceKitten/contributors","subscribers_url":"https://api.github.com/repos/jpsim/SourceKitten/subscribers","subscription_url":"https://api.github.com/repos/jpsim/SourceKitten/subscription","commits_url":"https://api.github.com/repos/jpsim/SourceKitten/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpsim/SourceKitten/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpsim/SourceKitten/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpsim/SourceKitten/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpsim/SourceKitten/contents/{+path}","compare_url":"https://api.github.com/repos/jpsim/SourceKitten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpsim/SourceKitten/merges","archive_url":"https://api.github.com/repos/jpsim/SourceKitten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpsim/SourceKitten/downloads","issues_url":"https://api.github.com/repos/jpsim/SourceKitten/issues{/number}","pulls_url":"https://api.github.com/repos/jpsim/SourceKitten/pulls{/number}","milestones_url":"https://api.github.com/repos/jpsim/SourceKitten/milestones{/number}","notifications_url":"https://api.github.com/repos/jpsim/SourceKitten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpsim/SourceKitten/labels{/name}","releases_url":"https://api.github.com/repos/jpsim/SourceKitten/releases{/id}","created_at":"2014-08-17T20:07:25Z","updated_at":"2015-08-17T15:10:18Z","pushed_at":"2015-08-15T03:59:32Z","git_url":"git://github.com/jpsim/SourceKitten.git","ssh_url":"git@github.com:jpsim/SourceKitten.git","clone_url":"https://github.com/jpsim/SourceKitten.git","svn_url":"https://github.com/jpsim/SourceKitten","homepage":"","size":4741,"stargazers_count":212,"watchers_count":212,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":14,"forks":23,"open_issues":14,"watchers":212,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60"},"html":{"href":"https://github.com/jpsim/SourceKitten/pull/60"},"issue":{"href":"https://api.github.com/repos/jpsim/SourceKitten/issues/60"},"comments":{"href":"https://api.github.com/repos/jpsim/SourceKitten/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jpsim/SourceKitten/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/jpsim/SourceKitten/statuses/bde49b7c72f3c9d4b75b987c45c6b6222789ac98"}}}}