{"action":"created","comment":{"url":"https://api.github.com/repos/Aaronepower/tokei/pulls/comments/226661193","pull_request_review_id":166541848,"id":226661193,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjY2MTE5Mw==","diff_hunk":"@@ -104,6 +112,9 @@ impl AddAssign for Language {\n         self.blanks += rhs.blanks;\n         self.code += rhs.code;\n         self.stats.extend(mem::replace(&mut rhs.stats, Vec::new()));\n+        if rhs.inaccurate {\n+            self.inaccurate = rhs.inaccurate","path":"src/language/mod.rs","position":27,"original_position":27,"commit_id":"a94749518b129289d055162663c841dab8f0a66b","original_commit_id":"a94749518b129289d055162663c841dab8f0a66b","user":{"login":"Aaronepower","id":4464295,"node_id":"MDQ6VXNlcjQ0NjQyOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/4464295?v=4","gravatar_id":"","url":"https://api.github.com/users/Aaronepower","html_url":"https://github.com/Aaronepower","followers_url":"https://api.github.com/users/Aaronepower/followers","following_url":"https://api.github.com/users/Aaronepower/following{/other_user}","gists_url":"https://api.github.com/users/Aaronepower/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronepower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronepower/subscriptions","organizations_url":"https://api.github.com/users/Aaronepower/orgs","repos_url":"https://api.github.com/users/Aaronepower/repos","events_url":"https://api.github.com/users/Aaronepower/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronepower/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n            self.inaccurate |= rhs.inaccurate\r\n```","created_at":"2018-10-19T14:11:19Z","updated_at":"2018-10-19T14:11:19Z","html_url":"https://github.com/Aaronepower/tokei/pull/270#discussion_r226661193","pull_request_url":"https://api.github.com/repos/Aaronepower/tokei/pulls/270","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/comments/226661193"},"html":{"href":"https://github.com/Aaronepower/tokei/pull/270#discussion_r226661193"},"pull_request":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/270"}}},"pull_request":{"url":"https://api.github.com/repos/Aaronepower/tokei/pulls/270","id":219438083,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDM4MDgz","html_url":"https://github.com/Aaronepower/tokei/pull/270","diff_url":"https://github.com/Aaronepower/tokei/pull/270.diff","patch_url":"https://github.com/Aaronepower/tokei/pull/270.patch","issue_url":"https://api.github.com/repos/Aaronepower/tokei/issues/270","number":270,"state":"open","locked":false,"title":"Show Inaccuracy Warning on permission error","user":{"login":"Veykril","id":3757771,"node_id":"MDQ6VXNlcjM3NTc3NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/3757771?v=4","gravatar_id":"","url":"https://api.github.com/users/Veykril","html_url":"https://github.com/Veykril","followers_url":"https://api.github.com/users/Veykril/followers","following_url":"https://api.github.com/users/Veykril/following{/other_user}","gists_url":"https://api.github.com/users/Veykril/gists{/gist_id}","starred_url":"https://api.github.com/users/Veykril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Veykril/subscriptions","organizations_url":"https://api.github.com/users/Veykril/orgs","repos_url":"https://api.github.com/users/Veykril/repos","events_url":"https://api.github.com/users/Veykril/events{/privacy}","received_events_url":"https://api.github.com/users/Veykril/received_events","type":"User","site_admin":false},"body":"This PR roughly implements issue #165. I am sure there is room for some improvements on my code changes so feel free to comment on everything I changed. One thing I dislike that I did is this weird if let bundle I created to check for a permission error at one place:\r\nhttps://github.com/Veykril/tokei/blob/0c7e18d1b0b45832c40c3a991be4bd57111ff5e5/src/utils/fs.rs#L52-L61\r\nI couldnt come up with a better way since the nested errors are boxed and box patterns arent stable yet.\r\n\r\nExample Output:\r\n```\r\nC:\\Workspace\\Rust\\tokei (error_output -> origin)                                                                       \r\nλ cargo run -- C:\\Workspace\\Rust\\test                                                                                  \r\n    Finished dev [unoptimized + debuginfo] target(s) in 0.18s                                                          \r\n     Running `target\\debug\\tokei.exe C:\\Workspace\\Rust\\test`                                                           \r\nERROR 2018-10-01T16:28:56Z: tokei::utils::fs: Permission denied for reading C:\\Workspace\\Rust\\test\\Cargo.toml          \r\nNote: results can be inaccurate for languages marked with '(!)'                                                        \r\n-----------------------------------------------------------------------------------------------------------------------\r\n Language                                                    Files        Lines         Code     Comments       Blanks \r\n-----------------------------------------------------------------------------------------------------------------------\r\n Markdown                                                        4         1380         1380            0            0 \r\n Rust                                                            1          123           99            1           23 \r\n Shell                                                           1           40           29            1           10 \r\n TOML (!)                                                        1           84           69            0           15 \r\n YAML                                                            1           80           60            8           12 \r\n-----------------------------------------------------------------------------------------------------------------------\r\n Total (!)                                                        8         1707         1637           10           60\r\n-----------------------------------------------------------------------------------------------------------------------\r\n```\r\n","created_at":"2018-10-01T16:29:39Z","updated_at":"2018-10-19T14:11:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d7852bbd9f00eb0b49d1f64c006f0b61e569ca8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Aaronepower/tokei/pulls/270/commits","review_comments_url":"https://api.github.com/repos/Aaronepower/tokei/pulls/270/comments","review_comment_url":"https://api.github.com/repos/Aaronepower/tokei/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Aaronepower/tokei/issues/270/comments","statuses_url":"https://api.github.com/repos/Aaronepower/tokei/statuses/a94749518b129289d055162663c841dab8f0a66b","head":{"label":"Veykril:error_output","ref":"error_output","sha":"a94749518b129289d055162663c841dab8f0a66b","user":{"login":"Veykril","id":3757771,"node_id":"MDQ6VXNlcjM3NTc3NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/3757771?v=4","gravatar_id":"","url":"https://api.github.com/users/Veykril","html_url":"https://github.com/Veykril","followers_url":"https://api.github.com/users/Veykril/followers","following_url":"https://api.github.com/users/Veykril/following{/other_user}","gists_url":"https://api.github.com/users/Veykril/gists{/gist_id}","starred_url":"https://api.github.com/users/Veykril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Veykril/subscriptions","organizations_url":"https://api.github.com/users/Veykril/orgs","repos_url":"https://api.github.com/users/Veykril/repos","events_url":"https://api.github.com/users/Veykril/events{/privacy}","received_events_url":"https://api.github.com/users/Veykril/received_events","type":"User","site_admin":false},"repo":{"id":151091895,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEwOTE4OTU=","name":"tokei","full_name":"Veykril/tokei","private":false,"owner":{"login":"Veykril","id":3757771,"node_id":"MDQ6VXNlcjM3NTc3NzE=","avatar_url":"https://avatars3.githubusercontent.com/u/3757771?v=4","gravatar_id":"","url":"https://api.github.com/users/Veykril","html_url":"https://github.com/Veykril","followers_url":"https://api.github.com/users/Veykril/followers","following_url":"https://api.github.com/users/Veykril/following{/other_user}","gists_url":"https://api.github.com/users/Veykril/gists{/gist_id}","starred_url":"https://api.github.com/users/Veykril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Veykril/subscriptions","organizations_url":"https://api.github.com/users/Veykril/orgs","repos_url":"https://api.github.com/users/Veykril/repos","events_url":"https://api.github.com/users/Veykril/events{/privacy}","received_events_url":"https://api.github.com/users/Veykril/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Veykril/tokei","description":"A program that allows you to count your code, quickly.","fork":true,"url":"https://api.github.com/repos/Veykril/tokei","forks_url":"https://api.github.com/repos/Veykril/tokei/forks","keys_url":"https://api.github.com/repos/Veykril/tokei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Veykril/tokei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Veykril/tokei/teams","hooks_url":"https://api.github.com/repos/Veykril/tokei/hooks","issue_events_url":"https://api.github.com/repos/Veykril/tokei/issues/events{/number}","events_url":"https://api.github.com/repos/Veykril/tokei/events","assignees_url":"https://api.github.com/repos/Veykril/tokei/assignees{/user}","branches_url":"https://api.github.com/repos/Veykril/tokei/branches{/branch}","tags_url":"https://api.github.com/repos/Veykril/tokei/tags","blobs_url":"https://api.github.com/repos/Veykril/tokei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Veykril/tokei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Veykril/tokei/git/refs{/sha}","trees_url":"https://api.github.com/repos/Veykril/tokei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Veykril/tokei/statuses/{sha}","languages_url":"https://api.github.com/repos/Veykril/tokei/languages","stargazers_url":"https://api.github.com/repos/Veykril/tokei/stargazers","contributors_url":"https://api.github.com/repos/Veykril/tokei/contributors","subscribers_url":"https://api.github.com/repos/Veykril/tokei/subscribers","subscription_url":"https://api.github.com/repos/Veykril/tokei/subscription","commits_url":"https://api.github.com/repos/Veykril/tokei/commits{/sha}","git_commits_url":"https://api.github.com/repos/Veykril/tokei/git/commits{/sha}","comments_url":"https://api.github.com/repos/Veykril/tokei/comments{/number}","issue_comment_url":"https://api.github.com/repos/Veykril/tokei/issues/comments{/number}","contents_url":"https://api.github.com/repos/Veykril/tokei/contents/{+path}","compare_url":"https://api.github.com/repos/Veykril/tokei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Veykril/tokei/merges","archive_url":"https://api.github.com/repos/Veykril/tokei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Veykril/tokei/downloads","issues_url":"https://api.github.com/repos/Veykril/tokei/issues{/number}","pulls_url":"https://api.github.com/repos/Veykril/tokei/pulls{/number}","milestones_url":"https://api.github.com/repos/Veykril/tokei/milestones{/number}","notifications_url":"https://api.github.com/repos/Veykril/tokei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Veykril/tokei/labels{/name}","releases_url":"https://api.github.com/repos/Veykril/tokei/releases{/id}","deployments_url":"https://api.github.com/repos/Veykril/tokei/deployments","created_at":"2018-10-01T13:19:30Z","updated_at":"2018-10-18T14:43:35Z","pushed_at":"2018-10-18T15:23:34Z","git_url":"git://github.com/Veykril/tokei.git","ssh_url":"git@github.com:Veykril/tokei.git","clone_url":"https://github.com/Veykril/tokei.git","svn_url":"https://github.com/Veykril/tokei","homepage":"","size":1587,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Aaronepower:master","ref":"master","sha":"a48f0818f5dbf279746e24184221eb1486e1ac42","user":{"login":"Aaronepower","id":4464295,"node_id":"MDQ6VXNlcjQ0NjQyOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/4464295?v=4","gravatar_id":"","url":"https://api.github.com/users/Aaronepower","html_url":"https://github.com/Aaronepower","followers_url":"https://api.github.com/users/Aaronepower/followers","following_url":"https://api.github.com/users/Aaronepower/following{/other_user}","gists_url":"https://api.github.com/users/Aaronepower/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronepower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronepower/subscriptions","organizations_url":"https://api.github.com/users/Aaronepower/orgs","repos_url":"https://api.github.com/users/Aaronepower/repos","events_url":"https://api.github.com/users/Aaronepower/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronepower/received_events","type":"User","site_admin":false},"repo":{"id":36323226,"node_id":"MDEwOlJlcG9zaXRvcnkzNjMyMzIyNg==","name":"tokei","full_name":"Aaronepower/tokei","private":false,"owner":{"login":"Aaronepower","id":4464295,"node_id":"MDQ6VXNlcjQ0NjQyOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/4464295?v=4","gravatar_id":"","url":"https://api.github.com/users/Aaronepower","html_url":"https://github.com/Aaronepower","followers_url":"https://api.github.com/users/Aaronepower/followers","following_url":"https://api.github.com/users/Aaronepower/following{/other_user}","gists_url":"https://api.github.com/users/Aaronepower/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaronepower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaronepower/subscriptions","organizations_url":"https://api.github.com/users/Aaronepower/orgs","repos_url":"https://api.github.com/users/Aaronepower/repos","events_url":"https://api.github.com/users/Aaronepower/events{/privacy}","received_events_url":"https://api.github.com/users/Aaronepower/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Aaronepower/tokei","description":"A program that allows you to count your code, quickly.","fork":false,"url":"https://api.github.com/repos/Aaronepower/tokei","forks_url":"https://api.github.com/repos/Aaronepower/tokei/forks","keys_url":"https://api.github.com/repos/Aaronepower/tokei/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Aaronepower/tokei/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Aaronepower/tokei/teams","hooks_url":"https://api.github.com/repos/Aaronepower/tokei/hooks","issue_events_url":"https://api.github.com/repos/Aaronepower/tokei/issues/events{/number}","events_url":"https://api.github.com/repos/Aaronepower/tokei/events","assignees_url":"https://api.github.com/repos/Aaronepower/tokei/assignees{/user}","branches_url":"https://api.github.com/repos/Aaronepower/tokei/branches{/branch}","tags_url":"https://api.github.com/repos/Aaronepower/tokei/tags","blobs_url":"https://api.github.com/repos/Aaronepower/tokei/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Aaronepower/tokei/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Aaronepower/tokei/git/refs{/sha}","trees_url":"https://api.github.com/repos/Aaronepower/tokei/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Aaronepower/tokei/statuses/{sha}","languages_url":"https://api.github.com/repos/Aaronepower/tokei/languages","stargazers_url":"https://api.github.com/repos/Aaronepower/tokei/stargazers","contributors_url":"https://api.github.com/repos/Aaronepower/tokei/contributors","subscribers_url":"https://api.github.com/repos/Aaronepower/tokei/subscribers","subscription_url":"https://api.github.com/repos/Aaronepower/tokei/subscription","commits_url":"https://api.github.com/repos/Aaronepower/tokei/commits{/sha}","git_commits_url":"https://api.github.com/repos/Aaronepower/tokei/git/commits{/sha}","comments_url":"https://api.github.com/repos/Aaronepower/tokei/comments{/number}","issue_comment_url":"https://api.github.com/repos/Aaronepower/tokei/issues/comments{/number}","contents_url":"https://api.github.com/repos/Aaronepower/tokei/contents/{+path}","compare_url":"https://api.github.com/repos/Aaronepower/tokei/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Aaronepower/tokei/merges","archive_url":"https://api.github.com/repos/Aaronepower/tokei/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Aaronepower/tokei/downloads","issues_url":"https://api.github.com/repos/Aaronepower/tokei/issues{/number}","pulls_url":"https://api.github.com/repos/Aaronepower/tokei/pulls{/number}","milestones_url":"https://api.github.com/repos/Aaronepower/tokei/milestones{/number}","notifications_url":"https://api.github.com/repos/Aaronepower/tokei/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Aaronepower/tokei/labels{/name}","releases_url":"https://api.github.com/repos/Aaronepower/tokei/releases{/id}","deployments_url":"https://api.github.com/repos/Aaronepower/tokei/deployments","created_at":"2015-05-26T20:55:45Z","updated_at":"2018-10-19T09:13:53Z","pushed_at":"2018-10-18T15:23:35Z","git_url":"git://github.com/Aaronepower/tokei.git","ssh_url":"git@github.com:Aaronepower/tokei.git","clone_url":"https://github.com/Aaronepower/tokei.git","svn_url":"https://github.com/Aaronepower/tokei","homepage":"","size":1604,"stargazers_count":1418,"watchers_count":1418,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":30,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":108,"open_issues":30,"watchers":1418,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/270"},"html":{"href":"https://github.com/Aaronepower/tokei/pull/270"},"issue":{"href":"https://api.github.com/repos/Aaronepower/tokei/issues/270"},"comments":{"href":"https://api.github.com/repos/Aaronepower/tokei/issues/270/comments"},"review_comments":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/270/comments"},"review_comment":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Aaronepower/tokei/pulls/270/commits"},"statuses":{"href":"https://api.github.com/repos/Aaronepower/tokei/statuses/a94749518b129289d055162663c841dab8f0a66b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Aaronepower"}}