{"action":"created","comment":{"url":"https://api.github.com/repos/keplerproject/luacov/pulls/comments/32970900","id":32970900,"diff_hunk":"@@ -43,54 +59,50 @@ local function check_long_string(line, in_long_string, ls_equals, linecount)\n end\n \n --- Lines that are always excluded from accounting\n-local exclusions = {\n-   { false, \"^#!\" },     -- Unix hash-bang magic line\n-   { true, \"\" },         -- Empty line\n-   { true, fixup \"end[,;)]?\" },-- Single \"end\"\n-   { true, fixup \"else\" },     -- Single \"else\"\n-   { true, fixup \"repeat\" },   -- Single \"repeat\"\n-   { true, fixup \"do\" },       -- Single \"do\"\n-   { true, fixup \"if\" },       -- Single \"if\"\n-   { true, fixup \"then\" },     -- Single \"then\"\n-   { true, fixup \"while true do\" }, -- \"while true do\" generates no code\n-   { true, fixup \"if true then\" }, -- \"if true then\" generates no code\n-   { true, fixup \"local <IDS>\" }, -- \"local var1, ..., varN\"\n-   { true, fixup \"local <IDS>=\" }, -- \"local var1, ..., varN =\"\n-   { true, fixup \"local function(<ARGS>)\" }, -- \"local function(arg1, ..., argN)\"\n-   { true, fixup \"local function <ID>(<ARGS>)\" }, -- \"local function f (arg1, ..., argN)\"\n+local any_hits_exclusions = {\n+   \"\", -- Empty line\n+   fixup \"end[,;%s%)]*\", -- Single \"end\"\n+   \"else\", -- Single \"else\"\n+   \"repeat\", -- Single \"repeat\"\n+   \"do\", -- Single \"do\"\n+   \"if\", -- Single \"if\"\n+   \"then\", -- Single \"then\"\n+   fixup \"while true do\", -- \"while true do\" generates no code\n+   fixup \"if true then\", -- \"if true then\" generates no code\n+   fixup \"local <IDS>\", -- \"local var1, ..., varN\"\n+   fixup \"local <IDS>=\", -- \"local var1, ..., varN =\"\n+   fixup \"local function(<ARGS>)\", -- \"local function(arg1, ..., argN)\"\n+   fixup \"local function <ID>(<ARGS>)\", -- \"local function f (arg1, ..., argN)\"\n }\n \n --- Lines that are only excluded from accounting when they have 0 hits\n-local hit0_exclusions = {\n-   { true, \"[%w_,='\\\" ]+,\" }, -- \"var1 var2,\" multi columns table stuff\n-   { true, fixup \"<FIELDNAME>=.+[,;]\" }, -- \"[123] = 23,\" \"['foo'] = \"asd\",\"\n-   { true, fixup \"<ARGS>*function(<ARGS>)\" }, -- \"1,2,function(...)\"\n-   { true, fixup \"return <ARGS>*function(<ARGS>)\" }, -- \"return 1,2,function(...)\"\n-   { true, fixup \"return function(<ARGS>)\" }, -- \"return function(arg1, ..., argN)\"\n-   { true, fixup \"function(<ARGS>)\" }, -- \"function(arg1, ..., argN)\"\n-   { true, fixup \"local <ID>=function(<ARGS>)\" }, -- \"local a = function(arg1, ..., argN)\"\n-   { true, fixup \"<FULLID>=function(<ARGS>)\" }, -- \"a = function(arg1, ..., argN)\"\n-   { true, fixup \"break\" }, -- \"break\" generates no trace in Lua 5.2\n-   { true, \"{\" }, -- \"{\" opening table\n-   { true, \"}\" }, -- \"{\" closing table\n-   { true, fixup \"})\" }, -- function closer\n-   { true, fixup \")\" }, -- function closer\n+local zero_hits_exclusions = {\n+   \"[%w_,='\\\"%s]+,\", -- \"var1 var2,\" multi columns table stuff\n+   fixup \"<FIELDNAME>=.+[,;]\", -- \"[123] = 23,\" \"['foo'] = \"asd\",\"\n+   fixup \"<ARGS>*function(<ARGS>)\", -- \"1,2,function(...)\"\n+   fixup \"return <ARGS>*function(<ARGS>)\", -- \"return 1,2,function(...)\"\n+   fixup \"return function(<ARGS>)\", -- \"return function(arg1, ..., argN)\"\n+   fixup \"function(<ARGS>)\", -- \"function(arg1, ..., argN)\"\n+   fixup \"local <ID>=function(<ARGS>)\", -- \"local a = function(arg1, ..., argN)\"\n+   fixup \"<FULLID>=function(<ARGS>)\", -- \"a = function(arg1, ..., argN)\"\n+   \"break\", -- \"break\" generates no trace in Lua 5.2+\n+   \"{\", -- \"{\" opening table\n+   \"}?[%s%)]*\", -- optional \"{\" closing table, possibly with several closing parens","path":"src/luacov/reporter.lua","position":118,"original_position":118,"commit_id":"4a4f984de45e87090a491a8ee9f6a2d693748380","original_commit_id":"4a4f984de45e87090a491a8ee9f6a2d693748380","user":{"login":"hishamhm","id":245621,"avatar_url":"https://avatars.githubusercontent.com/u/245621?v=3","gravatar_id":"","url":"https://api.github.com/users/hishamhm","html_url":"https://github.com/hishamhm","followers_url":"https://api.github.com/users/hishamhm/followers","following_url":"https://api.github.com/users/hishamhm/following{/other_user}","gists_url":"https://api.github.com/users/hishamhm/gists{/gist_id}","starred_url":"https://api.github.com/users/hishamhm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hishamhm/subscriptions","organizations_url":"https://api.github.com/users/hishamhm/orgs","repos_url":"https://api.github.com/users/hishamhm/repos","events_url":"https://api.github.com/users/hishamhm/events{/privacy}","received_events_url":"https://api.github.com/users/hishamhm/received_events","type":"User","site_admin":false},"body":"this matches the empty string ( \"}?\" accepts \"\" and \"[_anything_]*\" accepts \"\" too)","created_at":"2015-06-22T19:03:07Z","updated_at":"2015-06-22T19:03:07Z","html_url":"https://github.com/keplerproject/luacov/pull/27#discussion_r32970900","pull_request_url":"https://api.github.com/repos/keplerproject/luacov/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/comments/32970900"},"html":{"href":"https://github.com/keplerproject/luacov/pull/27#discussion_r32970900"},"pull_request":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/keplerproject/luacov/pulls/27","id":38260469,"html_url":"https://github.com/keplerproject/luacov/pull/27","diff_url":"https://github.com/keplerproject/luacov/pull/27.diff","patch_url":"https://github.com/keplerproject/luacov/pull/27.patch","issue_url":"https://api.github.com/repos/keplerproject/luacov/issues/27","number":27,"state":"open","locked":false,"title":"Improve line exclusion","user":{"login":"mpeterv","id":6032370,"avatar_url":"https://avatars.githubusercontent.com/u/6032370?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"body":"* Treat all whitespace characters identically.\r\n* Exclude lines with multiple closing parens, not only with one paren.\r\n* A bit of refactoring.\r\n\r\nSome questions:\r\n\r\n1. Is there a point in always filtering some lines? Maybe if a line is hit, it makes sense to always report it?\r\n2. Zero hit exclusions `return <ARGS>*function(<ARGS>)` and `<ARGS>*function(<ARGS>)` are broken, they expand into patterns containing `[...]**`, which typically never match. I think these exclusions are invalid anyway, because `<ARGS>` as expressions should always generate a trace.\r\n3. Comment for the first zero hit exclusion says `\"var1 var2,\" multi columns table stuff`, what does that mean? `var1 var2,` can rarely be valid syntax.","created_at":"2015-06-22T18:21:23Z","updated_at":"2015-06-22T19:03:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64a7c95238022347b53d748613e4cbf8208c42d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/keplerproject/luacov/pulls/27/commits","review_comments_url":"https://api.github.com/repos/keplerproject/luacov/pulls/27/comments","review_comment_url":"https://api.github.com/repos/keplerproject/luacov/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keplerproject/luacov/issues/27/comments","statuses_url":"https://api.github.com/repos/keplerproject/luacov/statuses/4a4f984de45e87090a491a8ee9f6a2d693748380","head":{"label":"mpeterv:improve-exclusions2","ref":"improve-exclusions2","sha":"4a4f984de45e87090a491a8ee9f6a2d693748380","user":{"login":"mpeterv","id":6032370,"avatar_url":"https://avatars.githubusercontent.com/u/6032370?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"repo":{"id":33200963,"name":"luacov","full_name":"mpeterv/luacov","owner":{"login":"mpeterv","id":6032370,"avatar_url":"https://avatars.githubusercontent.com/u/6032370?v=3","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mpeterv/luacov","description":"LuaCov is a simple coverage analyzer for Lua code.","fork":true,"url":"https://api.github.com/repos/mpeterv/luacov","forks_url":"https://api.github.com/repos/mpeterv/luacov/forks","keys_url":"https://api.github.com/repos/mpeterv/luacov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mpeterv/luacov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mpeterv/luacov/teams","hooks_url":"https://api.github.com/repos/mpeterv/luacov/hooks","issue_events_url":"https://api.github.com/repos/mpeterv/luacov/issues/events{/number}","events_url":"https://api.github.com/repos/mpeterv/luacov/events","assignees_url":"https://api.github.com/repos/mpeterv/luacov/assignees{/user}","branches_url":"https://api.github.com/repos/mpeterv/luacov/branches{/branch}","tags_url":"https://api.github.com/repos/mpeterv/luacov/tags","blobs_url":"https://api.github.com/repos/mpeterv/luacov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mpeterv/luacov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mpeterv/luacov/git/refs{/sha}","trees_url":"https://api.github.com/repos/mpeterv/luacov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mpeterv/luacov/statuses/{sha}","languages_url":"https://api.github.com/repos/mpeterv/luacov/languages","stargazers_url":"https://api.github.com/repos/mpeterv/luacov/stargazers","contributors_url":"https://api.github.com/repos/mpeterv/luacov/contributors","subscribers_url":"https://api.github.com/repos/mpeterv/luacov/subscribers","subscription_url":"https://api.github.com/repos/mpeterv/luacov/subscription","commits_url":"https://api.github.com/repos/mpeterv/luacov/commits{/sha}","git_commits_url":"https://api.github.com/repos/mpeterv/luacov/git/commits{/sha}","comments_url":"https://api.github.com/repos/mpeterv/luacov/comments{/number}","issue_comment_url":"https://api.github.com/repos/mpeterv/luacov/issues/comments{/number}","contents_url":"https://api.github.com/repos/mpeterv/luacov/contents/{+path}","compare_url":"https://api.github.com/repos/mpeterv/luacov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mpeterv/luacov/merges","archive_url":"https://api.github.com/repos/mpeterv/luacov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mpeterv/luacov/downloads","issues_url":"https://api.github.com/repos/mpeterv/luacov/issues{/number}","pulls_url":"https://api.github.com/repos/mpeterv/luacov/pulls{/number}","milestones_url":"https://api.github.com/repos/mpeterv/luacov/milestones{/number}","notifications_url":"https://api.github.com/repos/mpeterv/luacov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mpeterv/luacov/labels{/name}","releases_url":"https://api.github.com/repos/mpeterv/luacov/releases{/id}","created_at":"2015-03-31T17:59:12Z","updated_at":"2015-03-31T17:59:13Z","pushed_at":"2015-06-22T18:10:23Z","git_url":"git://github.com/mpeterv/luacov.git","ssh_url":"git@github.com:mpeterv/luacov.git","clone_url":"https://github.com/mpeterv/luacov.git","svn_url":"https://github.com/mpeterv/luacov","homepage":"http://keplerproject.github.com/luacov/","size":482,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"keplerproject:master","ref":"master","sha":"7e2fa24155def7b2069625df5421cbc366095df6","user":{"login":"keplerproject","id":129602,"avatar_url":"https://avatars.githubusercontent.com/u/129602?v=3","gravatar_id":"","url":"https://api.github.com/users/keplerproject","html_url":"https://github.com/keplerproject","followers_url":"https://api.github.com/users/keplerproject/followers","following_url":"https://api.github.com/users/keplerproject/following{/other_user}","gists_url":"https://api.github.com/users/keplerproject/gists{/gist_id}","starred_url":"https://api.github.com/users/keplerproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keplerproject/subscriptions","organizations_url":"https://api.github.com/users/keplerproject/orgs","repos_url":"https://api.github.com/users/keplerproject/repos","events_url":"https://api.github.com/users/keplerproject/events{/privacy}","received_events_url":"https://api.github.com/users/keplerproject/received_events","type":"Organization","site_admin":false},"repo":{"id":366447,"name":"luacov","full_name":"keplerproject/luacov","owner":{"login":"keplerproject","id":129602,"avatar_url":"https://avatars.githubusercontent.com/u/129602?v=3","gravatar_id":"","url":"https://api.github.com/users/keplerproject","html_url":"https://github.com/keplerproject","followers_url":"https://api.github.com/users/keplerproject/followers","following_url":"https://api.github.com/users/keplerproject/following{/other_user}","gists_url":"https://api.github.com/users/keplerproject/gists{/gist_id}","starred_url":"https://api.github.com/users/keplerproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keplerproject/subscriptions","organizations_url":"https://api.github.com/users/keplerproject/orgs","repos_url":"https://api.github.com/users/keplerproject/repos","events_url":"https://api.github.com/users/keplerproject/events{/privacy}","received_events_url":"https://api.github.com/users/keplerproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keplerproject/luacov","description":"LuaCov is a simple coverage analyzer for Lua code.","fork":true,"url":"https://api.github.com/repos/keplerproject/luacov","forks_url":"https://api.github.com/repos/keplerproject/luacov/forks","keys_url":"https://api.github.com/repos/keplerproject/luacov/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keplerproject/luacov/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keplerproject/luacov/teams","hooks_url":"https://api.github.com/repos/keplerproject/luacov/hooks","issue_events_url":"https://api.github.com/repos/keplerproject/luacov/issues/events{/number}","events_url":"https://api.github.com/repos/keplerproject/luacov/events","assignees_url":"https://api.github.com/repos/keplerproject/luacov/assignees{/user}","branches_url":"https://api.github.com/repos/keplerproject/luacov/branches{/branch}","tags_url":"https://api.github.com/repos/keplerproject/luacov/tags","blobs_url":"https://api.github.com/repos/keplerproject/luacov/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keplerproject/luacov/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keplerproject/luacov/git/refs{/sha}","trees_url":"https://api.github.com/repos/keplerproject/luacov/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keplerproject/luacov/statuses/{sha}","languages_url":"https://api.github.com/repos/keplerproject/luacov/languages","stargazers_url":"https://api.github.com/repos/keplerproject/luacov/stargazers","contributors_url":"https://api.github.com/repos/keplerproject/luacov/contributors","subscribers_url":"https://api.github.com/repos/keplerproject/luacov/subscribers","subscription_url":"https://api.github.com/repos/keplerproject/luacov/subscription","commits_url":"https://api.github.com/repos/keplerproject/luacov/commits{/sha}","git_commits_url":"https://api.github.com/repos/keplerproject/luacov/git/commits{/sha}","comments_url":"https://api.github.com/repos/keplerproject/luacov/comments{/number}","issue_comment_url":"https://api.github.com/repos/keplerproject/luacov/issues/comments{/number}","contents_url":"https://api.github.com/repos/keplerproject/luacov/contents/{+path}","compare_url":"https://api.github.com/repos/keplerproject/luacov/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keplerproject/luacov/merges","archive_url":"https://api.github.com/repos/keplerproject/luacov/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keplerproject/luacov/downloads","issues_url":"https://api.github.com/repos/keplerproject/luacov/issues{/number}","pulls_url":"https://api.github.com/repos/keplerproject/luacov/pulls{/number}","milestones_url":"https://api.github.com/repos/keplerproject/luacov/milestones{/number}","notifications_url":"https://api.github.com/repos/keplerproject/luacov/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keplerproject/luacov/labels{/name}","releases_url":"https://api.github.com/repos/keplerproject/luacov/releases{/id}","created_at":"2009-11-09T16:38:33Z","updated_at":"2015-06-19T23:33:44Z","pushed_at":"2015-06-22T18:21:24Z","git_url":"git://github.com/keplerproject/luacov.git","ssh_url":"git@github.com:keplerproject/luacov.git","clone_url":"https://github.com/keplerproject/luacov.git","svn_url":"https://github.com/keplerproject/luacov","homepage":"http://keplerproject.github.com/luacov/","size":773,"stargazers_count":40,"watchers_count":40,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":5,"forks":17,"open_issues":5,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/27"},"html":{"href":"https://github.com/keplerproject/luacov/pull/27"},"issue":{"href":"https://api.github.com/repos/keplerproject/luacov/issues/27"},"comments":{"href":"https://api.github.com/repos/keplerproject/luacov/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keplerproject/luacov/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/keplerproject/luacov/statuses/4a4f984de45e87090a491a8ee9f6a2d693748380"}}}}