{"action":"created","comment":{"url":"https://api.github.com/repos/google/googletest/pulls/comments/82503389","pull_request_review_id":3409243,"id":82503389,"diff_hunk":"@@ -738,10 +738,27 @@ def WrapComment(line, output):\n     output.append(prefix + cur_line.strip())\n \n \n+def FindSplitPos(seg, max_len, splitter):\n+  space_at = seg.find(splitter)\n+  if space_at == -1:\n+    return len(seg)\n+  else:","path":"googletest/scripts/pump.py","position":8,"original_position":8,"commit_id":"7dce0f5266f7fae545dc315cb4a349f17e17ef82","original_commit_id":"7dce0f5266f7fae545dc315cb4a349f17e17ef82","user":{"login":"BillyDonahue","id":8611652,"avatar_url":"https://avatars.githubusercontent.com/u/8611652?v=3","gravatar_id":"","url":"https://api.github.com/users/BillyDonahue","html_url":"https://github.com/BillyDonahue","followers_url":"https://api.github.com/users/BillyDonahue/followers","following_url":"https://api.github.com/users/BillyDonahue/following{/other_user}","gists_url":"https://api.github.com/users/BillyDonahue/gists{/gist_id}","starred_url":"https://api.github.com/users/BillyDonahue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillyDonahue/subscriptions","organizations_url":"https://api.github.com/users/BillyDonahue/orgs","repos_url":"https://api.github.com/users/BillyDonahue/repos","events_url":"https://api.github.com/users/BillyDonahue/events{/privacy}","received_events_url":"https://api.github.com/users/BillyDonahue/received_events","type":"User","site_admin":false},"body":"don't need else after a returning 'if'.","created_at":"2016-10-08T14:34:50Z","updated_at":"2016-10-08T14:34:50Z","html_url":"https://github.com/google/googletest/pull/896#discussion_r82503389","pull_request_url":"https://api.github.com/repos/google/googletest/pulls/896","_links":{"self":{"href":"https://api.github.com/repos/google/googletest/pulls/comments/82503389"},"html":{"href":"https://github.com/google/googletest/pull/896#discussion_r82503389"},"pull_request":{"href":"https://api.github.com/repos/google/googletest/pulls/896"}}},"pull_request":{"url":"https://api.github.com/repos/google/googletest/pulls/896","id":88318864,"html_url":"https://github.com/google/googletest/pull/896","diff_url":"https://github.com/google/googletest/pull/896.diff","patch_url":"https://github.com/google/googletest/pull/896.patch","issue_url":"https://api.github.com/repos/google/googletest/issues/896","number":896,"state":"open","locked":false,"title":"PUMP line breaking fix","user":{"login":"stryku","id":7505702,"avatar_url":"https://avatars.githubusercontent.com/u/7505702?v=3","gravatar_id":"","url":"https://api.github.com/users/stryku","html_url":"https://github.com/stryku","followers_url":"https://api.github.com/users/stryku/followers","following_url":"https://api.github.com/users/stryku/following{/other_user}","gists_url":"https://api.github.com/users/stryku/gists{/gist_id}","starred_url":"https://api.github.com/users/stryku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stryku/subscriptions","organizations_url":"https://api.github.com/users/stryku/orgs","repos_url":"https://api.github.com/users/stryku/repos","events_url":"https://api.github.com/users/stryku/events{/privacy}","received_events_url":"https://api.github.com/users/stryku/received_events","type":"User","site_admin":false},"body":"Hello (:\r\n\r\nI was playing with PUMP in my own project, and in one file I had line which has 80 spaces indentation and a '\\' at the end. Apparently PUMP had problem with it because it was consuming whole RAM etc.\r\nAfter quick research I found that the WrapCode method support maximum only <80 characters long line and it goes crazy in some cases, so I did two things:\r\n-Introduced 'max_reasonable_indent' as 60 characters. If line has longer indentation it's already weird and we'll only help it, stripping that indentation away.\r\n\r\nWas plying some more and found couple more problematic cases, so\r\n-Introduced FindSplitPos function, which cover corner cases that I found.\r\n\r\nIf I just broke some 'line breaking rules' and this should be done in different way, please let me know.","created_at":"2016-10-06T18:46:49Z","updated_at":"2016-10-08T14:34:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d290a2e84abe0046bbfdac54bf188e8c76340650","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/googletest/pulls/896/commits","review_comments_url":"https://api.github.com/repos/google/googletest/pulls/896/comments","review_comment_url":"https://api.github.com/repos/google/googletest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/googletest/issues/896/comments","statuses_url":"https://api.github.com/repos/google/googletest/statuses/7dce0f5266f7fae545dc315cb4a349f17e17ef82","head":{"label":"stryku:pump_fix","ref":"pump_fix","sha":"7dce0f5266f7fae545dc315cb4a349f17e17ef82","user":{"login":"stryku","id":7505702,"avatar_url":"https://avatars.githubusercontent.com/u/7505702?v=3","gravatar_id":"","url":"https://api.github.com/users/stryku","html_url":"https://github.com/stryku","followers_url":"https://api.github.com/users/stryku/followers","following_url":"https://api.github.com/users/stryku/following{/other_user}","gists_url":"https://api.github.com/users/stryku/gists{/gist_id}","starred_url":"https://api.github.com/users/stryku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stryku/subscriptions","organizations_url":"https://api.github.com/users/stryku/orgs","repos_url":"https://api.github.com/users/stryku/repos","events_url":"https://api.github.com/users/stryku/events{/privacy}","received_events_url":"https://api.github.com/users/stryku/received_events","type":"User","site_admin":false},"repo":{"id":66973176,"name":"googletest","full_name":"stryku/googletest","owner":{"login":"stryku","id":7505702,"avatar_url":"https://avatars.githubusercontent.com/u/7505702?v=3","gravatar_id":"","url":"https://api.github.com/users/stryku","html_url":"https://github.com/stryku","followers_url":"https://api.github.com/users/stryku/followers","following_url":"https://api.github.com/users/stryku/following{/other_user}","gists_url":"https://api.github.com/users/stryku/gists{/gist_id}","starred_url":"https://api.github.com/users/stryku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stryku/subscriptions","organizations_url":"https://api.github.com/users/stryku/orgs","repos_url":"https://api.github.com/users/stryku/repos","events_url":"https://api.github.com/users/stryku/events{/privacy}","received_events_url":"https://api.github.com/users/stryku/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stryku/googletest","description":"Google Test","fork":true,"url":"https://api.github.com/repos/stryku/googletest","forks_url":"https://api.github.com/repos/stryku/googletest/forks","keys_url":"https://api.github.com/repos/stryku/googletest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stryku/googletest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stryku/googletest/teams","hooks_url":"https://api.github.com/repos/stryku/googletest/hooks","issue_events_url":"https://api.github.com/repos/stryku/googletest/issues/events{/number}","events_url":"https://api.github.com/repos/stryku/googletest/events","assignees_url":"https://api.github.com/repos/stryku/googletest/assignees{/user}","branches_url":"https://api.github.com/repos/stryku/googletest/branches{/branch}","tags_url":"https://api.github.com/repos/stryku/googletest/tags","blobs_url":"https://api.github.com/repos/stryku/googletest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stryku/googletest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stryku/googletest/git/refs{/sha}","trees_url":"https://api.github.com/repos/stryku/googletest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stryku/googletest/statuses/{sha}","languages_url":"https://api.github.com/repos/stryku/googletest/languages","stargazers_url":"https://api.github.com/repos/stryku/googletest/stargazers","contributors_url":"https://api.github.com/repos/stryku/googletest/contributors","subscribers_url":"https://api.github.com/repos/stryku/googletest/subscribers","subscription_url":"https://api.github.com/repos/stryku/googletest/subscription","commits_url":"https://api.github.com/repos/stryku/googletest/commits{/sha}","git_commits_url":"https://api.github.com/repos/stryku/googletest/git/commits{/sha}","comments_url":"https://api.github.com/repos/stryku/googletest/comments{/number}","issue_comment_url":"https://api.github.com/repos/stryku/googletest/issues/comments{/number}","contents_url":"https://api.github.com/repos/stryku/googletest/contents/{+path}","compare_url":"https://api.github.com/repos/stryku/googletest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stryku/googletest/merges","archive_url":"https://api.github.com/repos/stryku/googletest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stryku/googletest/downloads","issues_url":"https://api.github.com/repos/stryku/googletest/issues{/number}","pulls_url":"https://api.github.com/repos/stryku/googletest/pulls{/number}","milestones_url":"https://api.github.com/repos/stryku/googletest/milestones{/number}","notifications_url":"https://api.github.com/repos/stryku/googletest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stryku/googletest/labels{/name}","releases_url":"https://api.github.com/repos/stryku/googletest/releases{/id}","deployments_url":"https://api.github.com/repos/stryku/googletest/deployments","created_at":"2016-08-30T19:57:02Z","updated_at":"2016-08-30T19:57:05Z","pushed_at":"2016-10-06T18:44:50Z","git_url":"git://github.com/stryku/googletest.git","ssh_url":"git@github.com:stryku/googletest.git","clone_url":"https://github.com/stryku/googletest.git","svn_url":"https://github.com/stryku/googletest","homepage":"","size":2563,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"google:master","ref":"master","sha":"ecd530865cefdfa7dea58e84f6aa1b548950363d","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":39840932,"name":"googletest","full_name":"google/googletest","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/googletest","description":"Google Test","fork":false,"url":"https://api.github.com/repos/google/googletest","forks_url":"https://api.github.com/repos/google/googletest/forks","keys_url":"https://api.github.com/repos/google/googletest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/googletest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/googletest/teams","hooks_url":"https://api.github.com/repos/google/googletest/hooks","issue_events_url":"https://api.github.com/repos/google/googletest/issues/events{/number}","events_url":"https://api.github.com/repos/google/googletest/events","assignees_url":"https://api.github.com/repos/google/googletest/assignees{/user}","branches_url":"https://api.github.com/repos/google/googletest/branches{/branch}","tags_url":"https://api.github.com/repos/google/googletest/tags","blobs_url":"https://api.github.com/repos/google/googletest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/googletest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/googletest/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/googletest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/googletest/statuses/{sha}","languages_url":"https://api.github.com/repos/google/googletest/languages","stargazers_url":"https://api.github.com/repos/google/googletest/stargazers","contributors_url":"https://api.github.com/repos/google/googletest/contributors","subscribers_url":"https://api.github.com/repos/google/googletest/subscribers","subscription_url":"https://api.github.com/repos/google/googletest/subscription","commits_url":"https://api.github.com/repos/google/googletest/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/googletest/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/googletest/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/googletest/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/googletest/contents/{+path}","compare_url":"https://api.github.com/repos/google/googletest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/googletest/merges","archive_url":"https://api.github.com/repos/google/googletest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/googletest/downloads","issues_url":"https://api.github.com/repos/google/googletest/issues{/number}","pulls_url":"https://api.github.com/repos/google/googletest/pulls{/number}","milestones_url":"https://api.github.com/repos/google/googletest/milestones{/number}","notifications_url":"https://api.github.com/repos/google/googletest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/googletest/labels{/name}","releases_url":"https://api.github.com/repos/google/googletest/releases{/id}","deployments_url":"https://api.github.com/repos/google/googletest/deployments","created_at":"2015-07-28T15:07:53Z","updated_at":"2016-10-08T13:55:30Z","pushed_at":"2016-10-07T19:54:59Z","git_url":"git://github.com/google/googletest.git","ssh_url":"git@github.com:google/googletest.git","clone_url":"https://github.com/google/googletest.git","svn_url":"https://github.com/google/googletest","homepage":"","size":3636,"stargazers_count":3300,"watchers_count":3300,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1355,"mirror_url":null,"open_issues_count":394,"forks":1355,"open_issues":394,"watchers":3300,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/googletest/pulls/896"},"html":{"href":"https://github.com/google/googletest/pull/896"},"issue":{"href":"https://api.github.com/repos/google/googletest/issues/896"},"comments":{"href":"https://api.github.com/repos/google/googletest/issues/896/comments"},"review_comments":{"href":"https://api.github.com/repos/google/googletest/pulls/896/comments"},"review_comment":{"href":"https://api.github.com/repos/google/googletest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/googletest/pulls/896/commits"},"statuses":{"href":"https://api.github.com/repos/google/googletest/statuses/7dce0f5266f7fae545dc315cb4a349f17e17ef82"}}}}
{"actor":{"display_login":"BillyDonahue"}}