{"action":"created","comment":{"url":"https://api.github.com/repos/kythe/kythe/pulls/comments/243114251","pull_request_review_id":186797328,"id":243114251,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzExNDI1MQ==","diff_hunk":"@@ -26,29 +28,31 @@ import (\n \t\"strings\"\n \n \t\"kythe.io/kythe/go/platform/kzip\"\n+\n+\t\"bitbucket.org/creachadair/stringset\"\n )\n \n-// Harness encapsulates data for validation of a single kzip and repo.\n-type Harness struct {\n+// Settings encapsulates data for validation of a single kzip and repo.\n+type Settings struct {\n \t// Path to the kzip file to validate.\n-\tKzip string\n+\tCompilations []string\n \t// Path to the root of the repo to compare the kzip against.\n \tRepo string\n \t// Language extensions to check, e.g. java, cpp, h.\n-\tLangs map[string]bool\n+\tLangs stringset.Set\n \t// Optional file to output missing paths to.\n \tMissingOutput *string\n }\n \n-// Result is a simple container struct explaining the results of validation.\n+// Result explains a validation outcome.\n type Result struct {\n-\t// Number of files in the kzip file matching one of Langs extensions.\n-\tFilesInKzip int\n+\t// Number of files in the kzip archives matching one of Langs extensions.\n+\tNumArchiveFiles int\n \t// Number of files in the repo matching one of Langs extensions.\n-\tFilesInRepo int\n+\tNumRepoFiles int\n \t// Number of files in the repo that were not matched in the kzip.\n \tMissing int","path":"kythe/go/extractors/validation/validation.go","position":54,"original_position":44,"commit_id":"36d6621fe282a88bbfff9dc7635731b97942c298","original_commit_id":"36d6621fe282a88bbfff9dc7635731b97942c298","user":{"login":"creachadair","id":19258,"node_id":"MDQ6VXNlcjE5MjU4","avatar_url":"https://avatars1.githubusercontent.com/u/19258?v=4","gravatar_id":"","url":"https://api.github.com/users/creachadair","html_url":"https://github.com/creachadair","followers_url":"https://api.github.com/users/creachadair/followers","following_url":"https://api.github.com/users/creachadair/following{/other_user}","gists_url":"https://api.github.com/users/creachadair/gists{/gist_id}","starred_url":"https://api.github.com/users/creachadair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creachadair/subscriptions","organizations_url":"https://api.github.com/users/creachadair/orgs","repos_url":"https://api.github.com/users/creachadair/repos","events_url":"https://api.github.com/users/creachadair/events{/privacy}","received_events_url":"https://api.github.com/users/creachadair/received_events","type":"User","site_admin":false},"body":"NumMissing? (in theme with the others)","created_at":"2018-12-19T23:39:34Z","updated_at":"2018-12-19T23:39:34Z","html_url":"https://github.com/kythe/kythe/pull/3336#discussion_r243114251","pull_request_url":"https://api.github.com/repos/kythe/kythe/pulls/3336","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kythe/kythe/pulls/comments/243114251"},"html":{"href":"https://github.com/kythe/kythe/pull/3336#discussion_r243114251"},"pull_request":{"href":"https://api.github.com/repos/kythe/kythe/pulls/3336"}}},"pull_request":{"url":"https://api.github.com/repos/kythe/kythe/pulls/3336","id":239985167,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5OTg1MTY3","html_url":"https://github.com/kythe/kythe/pull/3336","diff_url":"https://github.com/kythe/kythe/pull/3336.diff","patch_url":"https://github.com/kythe/kythe/pull/3336.patch","issue_url":"https://api.github.com/repos/kythe/kythe/issues/3336","number":3336,"state":"open","locked":false,"title":"feat: add a simple kzip validator","user":{"login":"danielmoy-google","id":27303001,"node_id":"MDQ6VXNlcjI3MzAzMDAx","avatar_url":"https://avatars0.githubusercontent.com/u/27303001?v=4","gravatar_id":"","url":"https://api.github.com/users/danielmoy-google","html_url":"https://github.com/danielmoy-google","followers_url":"https://api.github.com/users/danielmoy-google/followers","following_url":"https://api.github.com/users/danielmoy-google/following{/other_user}","gists_url":"https://api.github.com/users/danielmoy-google/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoy-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoy-google/subscriptions","organizations_url":"https://api.github.com/users/danielmoy-google/orgs","repos_url":"https://api.github.com/users/danielmoy-google/repos","events_url":"https://api.github.com/users/danielmoy-google/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoy-google/received_events","type":"User","site_admin":false},"body":"Opens a local kzip, and compares it to the contents in a local directory\r\nrepo root.  Prints out how much is missing, and isolates the top missing\r\ndirectories and prints them as well.\r\n\r\nUsage\r\n```\r\n  kzip_validator -kzip <kzip-file> \\\r\n                 -local_repo <repo-root-path> \\\r\n                 -lang <comma-separated-langs> \\\r\n                 [-missing_file <file-to-save-missing-paths-to>]\r\n```\r\n\r\nFuture versions of this should support grabbing the repo down from a\r\nremote url instead of loading it from local disk.  Future versions of\r\nthis might also want to work off of a blacklist for sub-parts of repos\r\nthe user might not care about.\r\n\r\nNotable problems with this initial commit:\r\n\r\n* aforementioned lack of support for remote repo fetching\r\n* if you verify against a local repo that's been built, you get noise from generated files we probably don't need\r\n* right now it is just looking at the included files, probably needs to do a bit more\r\n* tests forthcoming\r\n* output format probably should be refactored to be a proto or some known thing\r\n* output gives only high level stats, might be nice to see percentage coverage of different subdirectories in a single repo\r\n* etc etc","created_at":"2018-12-19T21:50:12Z","updated_at":"2018-12-19T23:39:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48ef1ae2af67f6ac03790fec3bb79463ad4f04db","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1024495230,"node_id":"MDU6TGFiZWwxMDI0NDk1MjMw","url":"https://api.github.com/repos/kythe/kythe/labels/cla:%20yes","name":"cla: yes","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kythe/kythe/pulls/3336/commits","review_comments_url":"https://api.github.com/repos/kythe/kythe/pulls/3336/comments","review_comment_url":"https://api.github.com/repos/kythe/kythe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kythe/kythe/issues/3336/comments","statuses_url":"https://api.github.com/repos/kythe/kythe/statuses/36d6621fe282a88bbfff9dc7635731b97942c298","head":{"label":"danielmoy-google:kzip-validate","ref":"kzip-validate","sha":"36d6621fe282a88bbfff9dc7635731b97942c298","user":{"login":"danielmoy-google","id":27303001,"node_id":"MDQ6VXNlcjI3MzAzMDAx","avatar_url":"https://avatars0.githubusercontent.com/u/27303001?v=4","gravatar_id":"","url":"https://api.github.com/users/danielmoy-google","html_url":"https://github.com/danielmoy-google","followers_url":"https://api.github.com/users/danielmoy-google/followers","following_url":"https://api.github.com/users/danielmoy-google/following{/other_user}","gists_url":"https://api.github.com/users/danielmoy-google/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoy-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoy-google/subscriptions","organizations_url":"https://api.github.com/users/danielmoy-google/orgs","repos_url":"https://api.github.com/users/danielmoy-google/repos","events_url":"https://api.github.com/users/danielmoy-google/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoy-google/received_events","type":"User","site_admin":false},"repo":{"id":134334252,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQzMzQyNTI=","name":"kythe","full_name":"danielmoy-google/kythe","private":false,"owner":{"login":"danielmoy-google","id":27303001,"node_id":"MDQ6VXNlcjI3MzAzMDAx","avatar_url":"https://avatars0.githubusercontent.com/u/27303001?v=4","gravatar_id":"","url":"https://api.github.com/users/danielmoy-google","html_url":"https://github.com/danielmoy-google","followers_url":"https://api.github.com/users/danielmoy-google/followers","following_url":"https://api.github.com/users/danielmoy-google/following{/other_user}","gists_url":"https://api.github.com/users/danielmoy-google/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmoy-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmoy-google/subscriptions","organizations_url":"https://api.github.com/users/danielmoy-google/orgs","repos_url":"https://api.github.com/users/danielmoy-google/repos","events_url":"https://api.github.com/users/danielmoy-google/events{/privacy}","received_events_url":"https://api.github.com/users/danielmoy-google/received_events","type":"User","site_admin":false},"html_url":"https://github.com/danielmoy-google/kythe","description":"Kythe is a pluggable, (mostly) language-agnostic ecosystem for building tools that work with code.","fork":true,"url":"https://api.github.com/repos/danielmoy-google/kythe","forks_url":"https://api.github.com/repos/danielmoy-google/kythe/forks","keys_url":"https://api.github.com/repos/danielmoy-google/kythe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielmoy-google/kythe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielmoy-google/kythe/teams","hooks_url":"https://api.github.com/repos/danielmoy-google/kythe/hooks","issue_events_url":"https://api.github.com/repos/danielmoy-google/kythe/issues/events{/number}","events_url":"https://api.github.com/repos/danielmoy-google/kythe/events","assignees_url":"https://api.github.com/repos/danielmoy-google/kythe/assignees{/user}","branches_url":"https://api.github.com/repos/danielmoy-google/kythe/branches{/branch}","tags_url":"https://api.github.com/repos/danielmoy-google/kythe/tags","blobs_url":"https://api.github.com/repos/danielmoy-google/kythe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielmoy-google/kythe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielmoy-google/kythe/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielmoy-google/kythe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielmoy-google/kythe/statuses/{sha}","languages_url":"https://api.github.com/repos/danielmoy-google/kythe/languages","stargazers_url":"https://api.github.com/repos/danielmoy-google/kythe/stargazers","contributors_url":"https://api.github.com/repos/danielmoy-google/kythe/contributors","subscribers_url":"https://api.github.com/repos/danielmoy-google/kythe/subscribers","subscription_url":"https://api.github.com/repos/danielmoy-google/kythe/subscription","commits_url":"https://api.github.com/repos/danielmoy-google/kythe/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielmoy-google/kythe/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielmoy-google/kythe/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielmoy-google/kythe/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielmoy-google/kythe/contents/{+path}","compare_url":"https://api.github.com/repos/danielmoy-google/kythe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielmoy-google/kythe/merges","archive_url":"https://api.github.com/repos/danielmoy-google/kythe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielmoy-google/kythe/downloads","issues_url":"https://api.github.com/repos/danielmoy-google/kythe/issues{/number}","pulls_url":"https://api.github.com/repos/danielmoy-google/kythe/pulls{/number}","milestones_url":"https://api.github.com/repos/danielmoy-google/kythe/milestones{/number}","notifications_url":"https://api.github.com/repos/danielmoy-google/kythe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielmoy-google/kythe/labels{/name}","releases_url":"https://api.github.com/repos/danielmoy-google/kythe/releases{/id}","deployments_url":"https://api.github.com/repos/danielmoy-google/kythe/deployments","created_at":"2018-05-21T23:07:40Z","updated_at":"2018-12-19T21:28:06Z","pushed_at":"2018-12-19T23:22:51Z","git_url":"git://github.com/danielmoy-google/kythe.git","ssh_url":"git@github.com:danielmoy-google/kythe.git","clone_url":"https://github.com/danielmoy-google/kythe.git","svn_url":"https://github.com/danielmoy-google/kythe","homepage":"https://kythe.io","size":171744,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kythe:master","ref":"master","sha":"01617d9cc0753550964c57af57c64644a0808798","user":{"login":"kythe","id":44679334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0Njc5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/44679334?v=4","gravatar_id":"","url":"https://api.github.com/users/kythe","html_url":"https://github.com/kythe","followers_url":"https://api.github.com/users/kythe/followers","following_url":"https://api.github.com/users/kythe/following{/other_user}","gists_url":"https://api.github.com/users/kythe/gists{/gist_id}","starred_url":"https://api.github.com/users/kythe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kythe/subscriptions","organizations_url":"https://api.github.com/users/kythe/orgs","repos_url":"https://api.github.com/users/kythe/repos","events_url":"https://api.github.com/users/kythe/events{/privacy}","received_events_url":"https://api.github.com/users/kythe/received_events","type":"Organization","site_admin":false},"repo":{"id":29174627,"node_id":"MDEwOlJlcG9zaXRvcnkyOTE3NDYyNw==","name":"kythe","full_name":"kythe/kythe","private":false,"owner":{"login":"kythe","id":44679334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0Njc5MzM0","avatar_url":"https://avatars3.githubusercontent.com/u/44679334?v=4","gravatar_id":"","url":"https://api.github.com/users/kythe","html_url":"https://github.com/kythe","followers_url":"https://api.github.com/users/kythe/followers","following_url":"https://api.github.com/users/kythe/following{/other_user}","gists_url":"https://api.github.com/users/kythe/gists{/gist_id}","starred_url":"https://api.github.com/users/kythe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kythe/subscriptions","organizations_url":"https://api.github.com/users/kythe/orgs","repos_url":"https://api.github.com/users/kythe/repos","events_url":"https://api.github.com/users/kythe/events{/privacy}","received_events_url":"https://api.github.com/users/kythe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kythe/kythe","description":"Kythe is a pluggable, (mostly) language-agnostic ecosystem for building tools that work with code.","fork":false,"url":"https://api.github.com/repos/kythe/kythe","forks_url":"https://api.github.com/repos/kythe/kythe/forks","keys_url":"https://api.github.com/repos/kythe/kythe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kythe/kythe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kythe/kythe/teams","hooks_url":"https://api.github.com/repos/kythe/kythe/hooks","issue_events_url":"https://api.github.com/repos/kythe/kythe/issues/events{/number}","events_url":"https://api.github.com/repos/kythe/kythe/events","assignees_url":"https://api.github.com/repos/kythe/kythe/assignees{/user}","branches_url":"https://api.github.com/repos/kythe/kythe/branches{/branch}","tags_url":"https://api.github.com/repos/kythe/kythe/tags","blobs_url":"https://api.github.com/repos/kythe/kythe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kythe/kythe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kythe/kythe/git/refs{/sha}","trees_url":"https://api.github.com/repos/kythe/kythe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kythe/kythe/statuses/{sha}","languages_url":"https://api.github.com/repos/kythe/kythe/languages","stargazers_url":"https://api.github.com/repos/kythe/kythe/stargazers","contributors_url":"https://api.github.com/repos/kythe/kythe/contributors","subscribers_url":"https://api.github.com/repos/kythe/kythe/subscribers","subscription_url":"https://api.github.com/repos/kythe/kythe/subscription","commits_url":"https://api.github.com/repos/kythe/kythe/commits{/sha}","git_commits_url":"https://api.github.com/repos/kythe/kythe/git/commits{/sha}","comments_url":"https://api.github.com/repos/kythe/kythe/comments{/number}","issue_comment_url":"https://api.github.com/repos/kythe/kythe/issues/comments{/number}","contents_url":"https://api.github.com/repos/kythe/kythe/contents/{+path}","compare_url":"https://api.github.com/repos/kythe/kythe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kythe/kythe/merges","archive_url":"https://api.github.com/repos/kythe/kythe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kythe/kythe/downloads","issues_url":"https://api.github.com/repos/kythe/kythe/issues{/number}","pulls_url":"https://api.github.com/repos/kythe/kythe/pulls{/number}","milestones_url":"https://api.github.com/repos/kythe/kythe/milestones{/number}","notifications_url":"https://api.github.com/repos/kythe/kythe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kythe/kythe/labels{/name}","releases_url":"https://api.github.com/repos/kythe/kythe/releases{/id}","deployments_url":"https://api.github.com/repos/kythe/kythe/deployments","created_at":"2015-01-13T05:39:06Z","updated_at":"2018-12-19T20:54:03Z","pushed_at":"2018-12-19T23:22:53Z","git_url":"git://github.com/kythe/kythe.git","ssh_url":"git@github.com:kythe/kythe.git","clone_url":"https://github.com/kythe/kythe.git","svn_url":"https://github.com/kythe/kythe","homepage":"https://kythe.io","size":171722,"stargazers_count":1121,"watchers_count":1121,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":144,"mirror_url":null,"archived":false,"open_issues_count":187,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":144,"open_issues":187,"watchers":1121,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kythe/kythe/pulls/3336"},"html":{"href":"https://github.com/kythe/kythe/pull/3336"},"issue":{"href":"https://api.github.com/repos/kythe/kythe/issues/3336"},"comments":{"href":"https://api.github.com/repos/kythe/kythe/issues/3336/comments"},"review_comments":{"href":"https://api.github.com/repos/kythe/kythe/pulls/3336/comments"},"review_comment":{"href":"https://api.github.com/repos/kythe/kythe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kythe/kythe/pulls/3336/commits"},"statuses":{"href":"https://api.github.com/repos/kythe/kythe/statuses/36d6621fe282a88bbfff9dc7635731b97942c298"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"creachadair"}}