{"action":"created","comment":{"url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/comments/60943765","id":60943765,"diff_hunk":"@@ -37,43 +39,52 @@ export function processPmdOutput(sourcesDirectory:string) : ar.AnalysisResult {\n \n // Verifies the existence of the HTML output file.\n // Modifies the relevant field within the returned object accordingly.\n-// Task fails if the file cannot be found.\n function processPmdHtml(analysisResult:ar.AnalysisResult, path:string):ar.AnalysisResult {\n-    // Task fails if the file cannot be found.\n     if (!tl.exist(path)) {\n-        throw new Error(\"Could not find PMD HTML output. Check that PMD ran successfully and that it is writing to the default location.\");\n+        tl.debug('PMD HTML not found at ' + path);\n+    } else {\n+        analysisResult.htmlFilePath = path;\n     }\n-    analysisResult.htmlFilePath = path;\n     return analysisResult;\n }\n \n // Verifies the existence of the XML output file and parses its contents.\n // Modifies the relevant fields within the returned object accordingly.\n-// Task fails if the file cannot be found.\n function processPmdXml(analysisResult:ar.AnalysisResult, path:string):ar.AnalysisResult {\n     if (!tl.exist(path)) {\n-        throw new Error(\"Could not find PMD XML output. Check that PMD ran successfully and that it is writing to the default location.\");\n+        tl.debug('PMD XML not found at ' + path);\n     }\n \n     var pmdXmlFileContents = fs.readFileSync(path, 'utf-8');\n     xml2js.parseString(pmdXmlFileContents, function (err, data) {\n-        if (data) {\n-            analysisResult.xmlFilePath = path;\n+        if (!data) { // Not an XML file, throw error\n+            throw new Error(\"Failed to parse XML output from PMD.\");","path":"Tasks/Maven/pmdformaven.ts","position":65,"original_position":65,"commit_id":"931081206f8b1ade11168e520d95f39d651596c0","original_commit_id":"931081206f8b1ade11168e520d95f39d651596c0","user":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"body":"I'm not sure it's necessary to throw here. This was never hit in development or testing.","created_at":"2016-04-25T16:28:48Z","updated_at":"2016-04-25T16:28:48Z","html_url":"https://github.com/HSAR/vso-agent-tasks/pull/5#discussion_r60943765","pull_request_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/comments/60943765"},"html":{"href":"https://github.com/HSAR/vso-agent-tasks/pull/5#discussion_r60943765"},"pull_request":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5","id":67745456,"html_url":"https://github.com/HSAR/vso-agent-tasks/pull/5","diff_url":"https://github.com/HSAR/vso-agent-tasks/pull/5.diff","patch_url":"https://github.com/HSAR/vso-agent-tasks/pull/5.patch","issue_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/5","number":5,"state":"open","locked":false,"title":"Added support for code analysis of Maven projects with multiple modules.","user":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"body":"This commit also removes the code cross-reference feature, which did not work without the relevant files anyway.","created_at":"2016-04-25T16:04:52Z","updated_at":"2016-04-25T16:28:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"917ef53a6622c7674737207acbeec4bfd4d12d90","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5/commits","review_comments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5/comments","review_comment_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/5/comments","statuses_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/statuses/931081206f8b1ade11168e520d95f39d651596c0","head":{"label":"HSAR:users/sschen/wip","ref":"users/sschen/wip","sha":"931081206f8b1ade11168e520d95f39d651596c0","user":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"repo":{"id":54405496,"name":"vso-agent-tasks","full_name":"HSAR/vso-agent-tasks","owner":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HSAR/vso-agent-tasks","description":"Build and Release Tasks for Visual Studio Online and Team Foundation Server","fork":true,"url":"https://api.github.com/repos/HSAR/vso-agent-tasks","forks_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/forks","keys_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/teams","hooks_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/hooks","issue_events_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/events","assignees_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/tags","blobs_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/languages","stargazers_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/stargazers","contributors_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/contributors","subscribers_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/subscribers","subscription_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/subscription","commits_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/merges","archive_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/downloads","issues_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/labels{/name}","releases_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/deployments","created_at":"2016-03-21T16:32:43Z","updated_at":"2016-03-21T16:32:50Z","pushed_at":"2016-04-25T16:14:52Z","git_url":"git://github.com/HSAR/vso-agent-tasks.git","ssh_url":"git@github.com:HSAR/vso-agent-tasks.git","clone_url":"https://github.com/HSAR/vso-agent-tasks.git","svn_url":"https://github.com/HSAR/vso-agent-tasks","homepage":" https://www.visualstudio.com/features/devops-vs","size":10137,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"HSAR:users/sschen/javatools","ref":"users/sschen/javatools","sha":"23e62b574820fcaa4d2ba40cd9e0a01779ecd43b","user":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"repo":{"id":54405496,"name":"vso-agent-tasks","full_name":"HSAR/vso-agent-tasks","owner":{"login":"HSAR","id":985911,"avatar_url":"https://avatars.githubusercontent.com/u/985911?v=3","gravatar_id":"","url":"https://api.github.com/users/HSAR","html_url":"https://github.com/HSAR","followers_url":"https://api.github.com/users/HSAR/followers","following_url":"https://api.github.com/users/HSAR/following{/other_user}","gists_url":"https://api.github.com/users/HSAR/gists{/gist_id}","starred_url":"https://api.github.com/users/HSAR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HSAR/subscriptions","organizations_url":"https://api.github.com/users/HSAR/orgs","repos_url":"https://api.github.com/users/HSAR/repos","events_url":"https://api.github.com/users/HSAR/events{/privacy}","received_events_url":"https://api.github.com/users/HSAR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HSAR/vso-agent-tasks","description":"Build and Release Tasks for Visual Studio Online and Team Foundation Server","fork":true,"url":"https://api.github.com/repos/HSAR/vso-agent-tasks","forks_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/forks","keys_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/teams","hooks_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/hooks","issue_events_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/events","assignees_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/tags","blobs_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/languages","stargazers_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/stargazers","contributors_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/contributors","subscribers_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/subscribers","subscription_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/subscription","commits_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/merges","archive_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/downloads","issues_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/labels{/name}","releases_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/HSAR/vso-agent-tasks/deployments","created_at":"2016-03-21T16:32:43Z","updated_at":"2016-03-21T16:32:50Z","pushed_at":"2016-04-25T16:14:52Z","git_url":"git://github.com/HSAR/vso-agent-tasks.git","ssh_url":"git@github.com:HSAR/vso-agent-tasks.git","clone_url":"https://github.com/HSAR/vso-agent-tasks.git","svn_url":"https://github.com/HSAR/vso-agent-tasks","homepage":" https://www.visualstudio.com/features/devops-vs","size":10137,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5"},"html":{"href":"https://github.com/HSAR/vso-agent-tasks/pull/5"},"issue":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/5"},"comments":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/HSAR/vso-agent-tasks/statuses/931081206f8b1ade11168e520d95f39d651596c0"}}}}