{"action":"created","comment":{"url":"https://api.github.com/repos/angular/clang-format/pulls/comments/56967760","id":56967760,"diff_hunk":"@@ -31,9 +31,9 @@ function clangFormat(file, enc, style, done) {\n function spawnClangFormat(args, done, stdio) {\n   // WARNING: This function's interface should stay stable across versions for the cross-version\n   // loading below to work.\n-  if (args.indexOf('-version') !== -1 || args.indexOf('--version') !== -1) {\n+  if (args.indexOf('--version') !== -1) {","path":"index.js","position":5,"original_position":5,"commit_id":"ac28a1bc04a05785291aa4b0cd81e5232bf15ba6","original_commit_id":"ac28a1bc04a05785291aa4b0cd81e5232bf15ba6","user":{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false},"body":"Roger, will modify to do that. I'll also squash everything into a single commit.","created_at":"2016-03-22T10:59:54Z","updated_at":"2016-03-22T10:59:54Z","html_url":"https://github.com/angular/clang-format/pull/26#discussion_r56967760","pull_request_url":"https://api.github.com/repos/angular/clang-format/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/angular/clang-format/pulls/comments/56967760"},"html":{"href":"https://github.com/angular/clang-format/pull/26#discussion_r56967760"},"pull_request":{"href":"https://api.github.com/repos/angular/clang-format/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/angular/clang-format/pulls/26","id":63468439,"html_url":"https://github.com/angular/clang-format/pull/26","diff_url":"https://github.com/angular/clang-format/pull/26.diff","patch_url":"https://github.com/angular/clang-format/pull/26.patch","issue_url":"https://api.github.com/repos/angular/clang-format/issues/26","number":26,"state":"open","locked":false,"title":"Add globIgnore arg","user":{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false},"body":"Following discussion on https://github.com/angular/clang-format/issues/25, I worked on adding an exclude functionality, and also wanted to always use `node-glob` for all patterns.\r\n\r\nWhen I was thinking about how to parse the args, I figured that a whitelist would be needed so that I could separate between what args to let through to the `clang-format` binary and which should I try to glob. \r\n\r\nI also tried to figure a good way to support multiple globs together with multiple ignore patterns, and it began sounding more difficult than I initially thought.\r\n\r\nSo I ended up only adding the `--globIgnore=` argument. I thought it would be simpler and more obvious. If a user wants native `clang-format` behaviour he will use everything but the double dash args.\r\n\r\nThis left out version. I refactored it so that `-version` is passed to the native binary, but `--version` is used by the wrapper. This way the wrapper only has to process double dash args throughout.\r\n\r\nI also had to slightly refactor the tests to run on windows though, the path in `EXPECTED_VERSION_STRING` wasn't playing well with windows paths, but now it should work.\r\n\r\nThis might be too much for a single PR but these changes followed one another so I left them.\r\n\r\n","created_at":"2016-03-19T13:55:26Z","updated_at":"2016-03-22T10:59:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55ed4381c64dd309801dcede2d4a958689428a04","assignee":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/clang-format/pulls/26/commits","review_comments_url":"https://api.github.com/repos/angular/clang-format/pulls/26/comments","review_comment_url":"https://api.github.com/repos/angular/clang-format/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/clang-format/issues/26/comments","statuses_url":"https://api.github.com/repos/angular/clang-format/statuses/ac28a1bc04a05785291aa4b0cd81e5232bf15ba6","head":{"label":"filipesilva:glob-exclude","ref":"glob-exclude","sha":"ac28a1bc04a05785291aa4b0cd81e5232bf15ba6","user":{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false},"repo":{"id":51547625,"name":"clang-format","full_name":"filipesilva/clang-format","owner":{"login":"filipesilva","id":4172079,"avatar_url":"https://avatars.githubusercontent.com/u/4172079?v=3","gravatar_id":"","url":"https://api.github.com/users/filipesilva","html_url":"https://github.com/filipesilva","followers_url":"https://api.github.com/users/filipesilva/followers","following_url":"https://api.github.com/users/filipesilva/following{/other_user}","gists_url":"https://api.github.com/users/filipesilva/gists{/gist_id}","starred_url":"https://api.github.com/users/filipesilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipesilva/subscriptions","organizations_url":"https://api.github.com/users/filipesilva/orgs","repos_url":"https://api.github.com/users/filipesilva/repos","events_url":"https://api.github.com/users/filipesilva/events{/privacy}","received_events_url":"https://api.github.com/users/filipesilva/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/filipesilva/clang-format","description":"Node repackaging of the clang-format native binary","fork":true,"url":"https://api.github.com/repos/filipesilva/clang-format","forks_url":"https://api.github.com/repos/filipesilva/clang-format/forks","keys_url":"https://api.github.com/repos/filipesilva/clang-format/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filipesilva/clang-format/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filipesilva/clang-format/teams","hooks_url":"https://api.github.com/repos/filipesilva/clang-format/hooks","issue_events_url":"https://api.github.com/repos/filipesilva/clang-format/issues/events{/number}","events_url":"https://api.github.com/repos/filipesilva/clang-format/events","assignees_url":"https://api.github.com/repos/filipesilva/clang-format/assignees{/user}","branches_url":"https://api.github.com/repos/filipesilva/clang-format/branches{/branch}","tags_url":"https://api.github.com/repos/filipesilva/clang-format/tags","blobs_url":"https://api.github.com/repos/filipesilva/clang-format/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filipesilva/clang-format/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filipesilva/clang-format/git/refs{/sha}","trees_url":"https://api.github.com/repos/filipesilva/clang-format/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filipesilva/clang-format/statuses/{sha}","languages_url":"https://api.github.com/repos/filipesilva/clang-format/languages","stargazers_url":"https://api.github.com/repos/filipesilva/clang-format/stargazers","contributors_url":"https://api.github.com/repos/filipesilva/clang-format/contributors","subscribers_url":"https://api.github.com/repos/filipesilva/clang-format/subscribers","subscription_url":"https://api.github.com/repos/filipesilva/clang-format/subscription","commits_url":"https://api.github.com/repos/filipesilva/clang-format/commits{/sha}","git_commits_url":"https://api.github.com/repos/filipesilva/clang-format/git/commits{/sha}","comments_url":"https://api.github.com/repos/filipesilva/clang-format/comments{/number}","issue_comment_url":"https://api.github.com/repos/filipesilva/clang-format/issues/comments{/number}","contents_url":"https://api.github.com/repos/filipesilva/clang-format/contents/{+path}","compare_url":"https://api.github.com/repos/filipesilva/clang-format/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filipesilva/clang-format/merges","archive_url":"https://api.github.com/repos/filipesilva/clang-format/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filipesilva/clang-format/downloads","issues_url":"https://api.github.com/repos/filipesilva/clang-format/issues{/number}","pulls_url":"https://api.github.com/repos/filipesilva/clang-format/pulls{/number}","milestones_url":"https://api.github.com/repos/filipesilva/clang-format/milestones{/number}","notifications_url":"https://api.github.com/repos/filipesilva/clang-format/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filipesilva/clang-format/labels{/name}","releases_url":"https://api.github.com/repos/filipesilva/clang-format/releases{/id}","deployments_url":"https://api.github.com/repos/filipesilva/clang-format/deployments","created_at":"2016-02-11T21:16:53Z","updated_at":"2016-02-11T21:16:53Z","pushed_at":"2016-03-19T13:51:46Z","git_url":"git://github.com/filipesilva/clang-format.git","ssh_url":"git@github.com:filipesilva/clang-format.git","clone_url":"https://github.com/filipesilva/clang-format.git","svn_url":"https://github.com/filipesilva/clang-format","homepage":null,"size":24325,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"angular:master","ref":"master","sha":"25f7c435102e95b3821aed2ef64eab31e9cc1267","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":32405165,"name":"clang-format","full_name":"angular/clang-format","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/clang-format","description":"Node repackaging of the clang-format native binary","fork":false,"url":"https://api.github.com/repos/angular/clang-format","forks_url":"https://api.github.com/repos/angular/clang-format/forks","keys_url":"https://api.github.com/repos/angular/clang-format/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/clang-format/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/clang-format/teams","hooks_url":"https://api.github.com/repos/angular/clang-format/hooks","issue_events_url":"https://api.github.com/repos/angular/clang-format/issues/events{/number}","events_url":"https://api.github.com/repos/angular/clang-format/events","assignees_url":"https://api.github.com/repos/angular/clang-format/assignees{/user}","branches_url":"https://api.github.com/repos/angular/clang-format/branches{/branch}","tags_url":"https://api.github.com/repos/angular/clang-format/tags","blobs_url":"https://api.github.com/repos/angular/clang-format/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/clang-format/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/clang-format/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/clang-format/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/clang-format/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/clang-format/languages","stargazers_url":"https://api.github.com/repos/angular/clang-format/stargazers","contributors_url":"https://api.github.com/repos/angular/clang-format/contributors","subscribers_url":"https://api.github.com/repos/angular/clang-format/subscribers","subscription_url":"https://api.github.com/repos/angular/clang-format/subscription","commits_url":"https://api.github.com/repos/angular/clang-format/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/clang-format/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/clang-format/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/clang-format/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/clang-format/contents/{+path}","compare_url":"https://api.github.com/repos/angular/clang-format/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/clang-format/merges","archive_url":"https://api.github.com/repos/angular/clang-format/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/clang-format/downloads","issues_url":"https://api.github.com/repos/angular/clang-format/issues{/number}","pulls_url":"https://api.github.com/repos/angular/clang-format/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/clang-format/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/clang-format/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/clang-format/labels{/name}","releases_url":"https://api.github.com/repos/angular/clang-format/releases{/id}","deployments_url":"https://api.github.com/repos/angular/clang-format/deployments","created_at":"2015-03-17T16:21:18Z","updated_at":"2016-01-23T04:43:40Z","pushed_at":"2016-03-19T13:55:26Z","git_url":"git://github.com/angular/clang-format.git","ssh_url":"git@github.com:angular/clang-format.git","clone_url":"https://github.com/angular/clang-format.git","svn_url":"https://github.com/angular/clang-format","homepage":null,"size":24829,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/clang-format/pulls/26"},"html":{"href":"https://github.com/angular/clang-format/pull/26"},"issue":{"href":"https://api.github.com/repos/angular/clang-format/issues/26"},"comments":{"href":"https://api.github.com/repos/angular/clang-format/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/clang-format/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/clang-format/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/clang-format/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/angular/clang-format/statuses/ac28a1bc04a05785291aa4b0cd81e5232bf15ba6"}}}}