{"action":"opened","number":532,"pull_request":{"url":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532","id":212501891,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNTAxODkx","html_url":"https://github.com/IntelVCL/Open3D/pull/532","diff_url":"https://github.com/IntelVCL/Open3D/pull/532.diff","patch_url":"https://github.com/IntelVCL/Open3D/pull/532.patch","issue_url":"https://api.github.com/repos/IntelVCL/Open3D/issues/532","number":532,"state":"open","locked":false,"title":"Add clang-format file, PR 1","user":{"login":"yxlao","id":1501945,"node_id":"MDQ6VXNlcjE1MDE5NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1501945?v=4","gravatar_id":"","url":"https://api.github.com/users/yxlao","html_url":"https://github.com/yxlao","followers_url":"https://api.github.com/users/yxlao/followers","following_url":"https://api.github.com/users/yxlao/following{/other_user}","gists_url":"https://api.github.com/users/yxlao/gists{/gist_id}","starred_url":"https://api.github.com/users/yxlao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxlao/subscriptions","organizations_url":"https://api.github.com/users/yxlao/orgs","repos_url":"https://api.github.com/users/yxlao/repos","events_url":"https://api.github.com/users/yxlao/events{/privacy}","received_events_url":"https://api.github.com/users/yxlao/received_events","type":"User","site_admin":false},"body":"## Background\r\nClang-format is widely used in C++ projects such as [this](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/.clang-format) and [this](https://github.com/pytorch/pytorch/blob/master/.clang-format). Applying Clang-format to the Open3D code base could automatically ensure our code have consistent styling, and avoid manual formatting such as in https://github.com/IntelVCL/Open3D/pull/478. \r\n\r\nClang format works by first having a `.clang-format` file defining the desired style in the root folder, and then running the `clang-format` command to the targeted files, such as `clang-format -i my_file.cpp`.\r\n\r\n## Implementation\r\nTo avoid abrupt changes to the code base, we could make incremental changes:\r\n\r\n### PR 1 (this PR): Define format\r\nDefine and add `.clang-format` in our root directory.\r\n### PR 2: Add formatting scripts\r\nAdd two scripts for 1) checking if all cpp files are compliant, 2) formatting all cpp files. \r\n### PR 3: Apply format globally & Enable CI\r\nThere will be major changes to the code base. We can do this right before or right after a major release to minimize impacts. CI will be enabled so that further PRs will be style-checked.\r\n","created_at":"2018-08-31T21:53:48Z","updated_at":"2018-08-31T21:53:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532/commits","review_comments_url":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532/comments","review_comment_url":"https://api.github.com/repos/IntelVCL/Open3D/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IntelVCL/Open3D/issues/532/comments","statuses_url":"https://api.github.com/repos/IntelVCL/Open3D/statuses/ae393514f27883c5787bf0e1a80421d44864dd2e","head":{"label":"yxlao:clang-format-i","ref":"clang-format-i","sha":"ae393514f27883c5787bf0e1a80421d44864dd2e","user":{"login":"yxlao","id":1501945,"node_id":"MDQ6VXNlcjE1MDE5NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1501945?v=4","gravatar_id":"","url":"https://api.github.com/users/yxlao","html_url":"https://github.com/yxlao","followers_url":"https://api.github.com/users/yxlao/followers","following_url":"https://api.github.com/users/yxlao/following{/other_user}","gists_url":"https://api.github.com/users/yxlao/gists{/gist_id}","starred_url":"https://api.github.com/users/yxlao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxlao/subscriptions","organizations_url":"https://api.github.com/users/yxlao/orgs","repos_url":"https://api.github.com/users/yxlao/repos","events_url":"https://api.github.com/users/yxlao/events{/privacy}","received_events_url":"https://api.github.com/users/yxlao/received_events","type":"User","site_admin":false},"repo":{"id":137618792,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc2MTg3OTI=","name":"Open3D","full_name":"yxlao/Open3D","owner":{"login":"yxlao","id":1501945,"node_id":"MDQ6VXNlcjE1MDE5NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/1501945?v=4","gravatar_id":"","url":"https://api.github.com/users/yxlao","html_url":"https://github.com/yxlao","followers_url":"https://api.github.com/users/yxlao/followers","following_url":"https://api.github.com/users/yxlao/following{/other_user}","gists_url":"https://api.github.com/users/yxlao/gists{/gist_id}","starred_url":"https://api.github.com/users/yxlao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yxlao/subscriptions","organizations_url":"https://api.github.com/users/yxlao/orgs","repos_url":"https://api.github.com/users/yxlao/repos","events_url":"https://api.github.com/users/yxlao/events{/privacy}","received_events_url":"https://api.github.com/users/yxlao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yxlao/Open3D","description":"Open3D: A Modern Library for 3D Data Processing","fork":true,"url":"https://api.github.com/repos/yxlao/Open3D","forks_url":"https://api.github.com/repos/yxlao/Open3D/forks","keys_url":"https://api.github.com/repos/yxlao/Open3D/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yxlao/Open3D/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yxlao/Open3D/teams","hooks_url":"https://api.github.com/repos/yxlao/Open3D/hooks","issue_events_url":"https://api.github.com/repos/yxlao/Open3D/issues/events{/number}","events_url":"https://api.github.com/repos/yxlao/Open3D/events","assignees_url":"https://api.github.com/repos/yxlao/Open3D/assignees{/user}","branches_url":"https://api.github.com/repos/yxlao/Open3D/branches{/branch}","tags_url":"https://api.github.com/repos/yxlao/Open3D/tags","blobs_url":"https://api.github.com/repos/yxlao/Open3D/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yxlao/Open3D/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yxlao/Open3D/git/refs{/sha}","trees_url":"https://api.github.com/repos/yxlao/Open3D/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yxlao/Open3D/statuses/{sha}","languages_url":"https://api.github.com/repos/yxlao/Open3D/languages","stargazers_url":"https://api.github.com/repos/yxlao/Open3D/stargazers","contributors_url":"https://api.github.com/repos/yxlao/Open3D/contributors","subscribers_url":"https://api.github.com/repos/yxlao/Open3D/subscribers","subscription_url":"https://api.github.com/repos/yxlao/Open3D/subscription","commits_url":"https://api.github.com/repos/yxlao/Open3D/commits{/sha}","git_commits_url":"https://api.github.com/repos/yxlao/Open3D/git/commits{/sha}","comments_url":"https://api.github.com/repos/yxlao/Open3D/comments{/number}","issue_comment_url":"https://api.github.com/repos/yxlao/Open3D/issues/comments{/number}","contents_url":"https://api.github.com/repos/yxlao/Open3D/contents/{+path}","compare_url":"https://api.github.com/repos/yxlao/Open3D/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yxlao/Open3D/merges","archive_url":"https://api.github.com/repos/yxlao/Open3D/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yxlao/Open3D/downloads","issues_url":"https://api.github.com/repos/yxlao/Open3D/issues{/number}","pulls_url":"https://api.github.com/repos/yxlao/Open3D/pulls{/number}","milestones_url":"https://api.github.com/repos/yxlao/Open3D/milestones{/number}","notifications_url":"https://api.github.com/repos/yxlao/Open3D/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yxlao/Open3D/labels{/name}","releases_url":"https://api.github.com/repos/yxlao/Open3D/releases{/id}","deployments_url":"https://api.github.com/repos/yxlao/Open3D/deployments","created_at":"2018-06-17T00:27:42Z","updated_at":"2018-08-28T20:57:40Z","pushed_at":"2018-08-31T21:49:32Z","git_url":"git://github.com/yxlao/Open3D.git","ssh_url":"git@github.com:yxlao/Open3D.git","clone_url":"https://github.com/yxlao/Open3D.git","svn_url":"https://github.com/yxlao/Open3D","homepage":"http://www.open3d.org","size":66546,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"IntelVCL:master","ref":"master","sha":"73f98149e5a2b00ef6ecce098ecb592799f686cc","user":{"login":"IntelVCL","id":23507030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTA3MDMw","avatar_url":"https://avatars1.githubusercontent.com/u/23507030?v=4","gravatar_id":"","url":"https://api.github.com/users/IntelVCL","html_url":"https://github.com/IntelVCL","followers_url":"https://api.github.com/users/IntelVCL/followers","following_url":"https://api.github.com/users/IntelVCL/following{/other_user}","gists_url":"https://api.github.com/users/IntelVCL/gists{/gist_id}","starred_url":"https://api.github.com/users/IntelVCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IntelVCL/subscriptions","organizations_url":"https://api.github.com/users/IntelVCL/orgs","repos_url":"https://api.github.com/users/IntelVCL/repos","events_url":"https://api.github.com/users/IntelVCL/events{/privacy}","received_events_url":"https://api.github.com/users/IntelVCL/received_events","type":"Organization","site_admin":false},"repo":{"id":75413130,"node_id":"MDEwOlJlcG9zaXRvcnk3NTQxMzEzMA==","name":"Open3D","full_name":"IntelVCL/Open3D","owner":{"login":"IntelVCL","id":23507030,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTA3MDMw","avatar_url":"https://avatars1.githubusercontent.com/u/23507030?v=4","gravatar_id":"","url":"https://api.github.com/users/IntelVCL","html_url":"https://github.com/IntelVCL","followers_url":"https://api.github.com/users/IntelVCL/followers","following_url":"https://api.github.com/users/IntelVCL/following{/other_user}","gists_url":"https://api.github.com/users/IntelVCL/gists{/gist_id}","starred_url":"https://api.github.com/users/IntelVCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IntelVCL/subscriptions","organizations_url":"https://api.github.com/users/IntelVCL/orgs","repos_url":"https://api.github.com/users/IntelVCL/repos","events_url":"https://api.github.com/users/IntelVCL/events{/privacy}","received_events_url":"https://api.github.com/users/IntelVCL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IntelVCL/Open3D","description":"Open3D: A Modern Library for 3D Data Processing","fork":false,"url":"https://api.github.com/repos/IntelVCL/Open3D","forks_url":"https://api.github.com/repos/IntelVCL/Open3D/forks","keys_url":"https://api.github.com/repos/IntelVCL/Open3D/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IntelVCL/Open3D/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IntelVCL/Open3D/teams","hooks_url":"https://api.github.com/repos/IntelVCL/Open3D/hooks","issue_events_url":"https://api.github.com/repos/IntelVCL/Open3D/issues/events{/number}","events_url":"https://api.github.com/repos/IntelVCL/Open3D/events","assignees_url":"https://api.github.com/repos/IntelVCL/Open3D/assignees{/user}","branches_url":"https://api.github.com/repos/IntelVCL/Open3D/branches{/branch}","tags_url":"https://api.github.com/repos/IntelVCL/Open3D/tags","blobs_url":"https://api.github.com/repos/IntelVCL/Open3D/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IntelVCL/Open3D/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IntelVCL/Open3D/git/refs{/sha}","trees_url":"https://api.github.com/repos/IntelVCL/Open3D/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IntelVCL/Open3D/statuses/{sha}","languages_url":"https://api.github.com/repos/IntelVCL/Open3D/languages","stargazers_url":"https://api.github.com/repos/IntelVCL/Open3D/stargazers","contributors_url":"https://api.github.com/repos/IntelVCL/Open3D/contributors","subscribers_url":"https://api.github.com/repos/IntelVCL/Open3D/subscribers","subscription_url":"https://api.github.com/repos/IntelVCL/Open3D/subscription","commits_url":"https://api.github.com/repos/IntelVCL/Open3D/commits{/sha}","git_commits_url":"https://api.github.com/repos/IntelVCL/Open3D/git/commits{/sha}","comments_url":"https://api.github.com/repos/IntelVCL/Open3D/comments{/number}","issue_comment_url":"https://api.github.com/repos/IntelVCL/Open3D/issues/comments{/number}","contents_url":"https://api.github.com/repos/IntelVCL/Open3D/contents/{+path}","compare_url":"https://api.github.com/repos/IntelVCL/Open3D/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IntelVCL/Open3D/merges","archive_url":"https://api.github.com/repos/IntelVCL/Open3D/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IntelVCL/Open3D/downloads","issues_url":"https://api.github.com/repos/IntelVCL/Open3D/issues{/number}","pulls_url":"https://api.github.com/repos/IntelVCL/Open3D/pulls{/number}","milestones_url":"https://api.github.com/repos/IntelVCL/Open3D/milestones{/number}","notifications_url":"https://api.github.com/repos/IntelVCL/Open3D/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IntelVCL/Open3D/labels{/name}","releases_url":"https://api.github.com/repos/IntelVCL/Open3D/releases{/id}","deployments_url":"https://api.github.com/repos/IntelVCL/Open3D/deployments","created_at":"2016-12-02T16:40:38Z","updated_at":"2018-08-31T18:25:15Z","pushed_at":"2018-08-31T21:00:44Z","git_url":"git://github.com/IntelVCL/Open3D.git","ssh_url":"git@github.com:IntelVCL/Open3D.git","clone_url":"https://github.com/IntelVCL/Open3D.git","svn_url":"https://github.com/IntelVCL/Open3D","homepage":"http://www.open3d.org","size":66740,"stargazers_count":847,"watchers_count":847,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":157,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":157,"open_issues":61,"watchers":847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532"},"html":{"href":"https://github.com/IntelVCL/Open3D/pull/532"},"issue":{"href":"https://api.github.com/repos/IntelVCL/Open3D/issues/532"},"comments":{"href":"https://api.github.com/repos/IntelVCL/Open3D/issues/532/comments"},"review_comments":{"href":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532/comments"},"review_comment":{"href":"https://api.github.com/repos/IntelVCL/Open3D/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IntelVCL/Open3D/pulls/532/commits"},"statuses":{"href":"https://api.github.com/repos/IntelVCL/Open3D/statuses/ae393514f27883c5787bf0e1a80421d44864dd2e"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":7,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"yxlao"}}