{"action":"created","comment":{"url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/comments/38389607","id":38389607,"diff_hunk":"@@ -3,6 +3,74 @@\n describe FindbugsTranslateCheckstyleFormat::Translate do\n   include FindbugsTranslateCheckstyleFormat::Translate\n \n+  describe 'trans' do\n+    before {\n+      allow(self).to receive(:fqcn_to_path).and_return('test.java')\n+    }\n+    context 'no BugInstance' do\n+      xml = {\n+        'BugCollection' => {\n+          'Project' => {\n+            'SrcDir' => 'test_dir'\n+          }\n+        }\n+      }\n+      subject(:doc) { trans(xml) }\n+      it 'return blank dom' do\n+        expect(doc.get_elements('/checkstyle/file/error')).to be_empty\n+        expect(doc.get_elements('/checkstyle/file').first.attribute('name').value).to eq('test_dir')\n+      end\n+    end\n+    context 'single BugInstance' do\n+      xml = {\n+        'BugCollection' => {\n+          'BugInstance' => {\n+            'SourceLine' => {\n+              '@classname' => 'com.example.Test',\n+              '@start' => 12\n+            }\n+          }\n+        }\n+      }\n+      subject(:doc) { trans(xml) }\n+      it 'return blank dom' do\n+        expect(doc.get_elements('/checkstyle/file/error')).not_to be_empty\n+        expect(doc.get_elements('/checkstyle/file/error').first.attribute('line').value).to eq('12')","path":"spec/findbugs_translate_checkstyle_format/translate_spec.rb","position":36,"original_position":36,"commit_id":"40353e5a0dd6ce51f1877b02707fa6fc03cd4e45","original_commit_id":"40353e5a0dd6ce51f1877b02707fa6fc03cd4e45","user":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"body":"__[rubocop]__\n* Line is too long. [100/80]","created_at":"2015-09-01T06:42:21Z","updated_at":"2015-09-01T06:42:21Z","html_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1#discussion_r38389607","pull_request_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/comments/38389607"},"html":{"href":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1#discussion_r38389607"},"pull_request":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1","id":43842188,"html_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1","diff_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1.diff","patch_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1.patch","issue_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/1","number":1,"state":"open","locked":false,"title":"Add test and refactor","user":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-01T06:42:07Z","updated_at":"2015-09-01T06:42:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e53cc631cd2996ad9e07cf479b196dd7406ecdfc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1/commits","review_comments_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1/comments","review_comment_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/comments{/number}","comments_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/1/comments","statuses_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/statuses/40353e5a0dd6ce51f1877b02707fa6fc03cd4e45","head":{"label":"noboru-i:add-test","ref":"add-test","sha":"40353e5a0dd6ce51f1877b02707fa6fc03cd4e45","user":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"repo":{"id":37186351,"name":"findbugs_translate_checkstyle_format","full_name":"noboru-i/findbugs_translate_checkstyle_format","owner":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format","description":"Translate findbugs format into checkstyle format.","fork":false,"url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format","forks_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/forks","keys_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/teams","hooks_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/hooks","issue_events_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/events{/number}","events_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/events","assignees_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/assignees{/user}","branches_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/branches{/branch}","tags_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/tags","blobs_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/refs{/sha}","trees_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/statuses/{sha}","languages_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/languages","stargazers_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/stargazers","contributors_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/contributors","subscribers_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/subscribers","subscription_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/subscription","commits_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/commits{/sha}","git_commits_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/commits{/sha}","comments_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/comments{/number}","issue_comment_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/comments{/number}","contents_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/contents/{+path}","compare_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/merges","archive_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/downloads","issues_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues{/number}","pulls_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls{/number}","milestones_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/milestones{/number}","notifications_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/labels{/name}","releases_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/releases{/id}","created_at":"2015-06-10T08:58:25Z","updated_at":"2015-06-10T08:59:46Z","pushed_at":"2015-09-01T06:42:07Z","git_url":"git://github.com/noboru-i/findbugs_translate_checkstyle_format.git","ssh_url":"git@github.com:noboru-i/findbugs_translate_checkstyle_format.git","clone_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format.git","svn_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"noboru-i:master","ref":"master","sha":"eb9d20c7ef03a8b489660c69bcdc5682325ceeaa","user":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"repo":{"id":37186351,"name":"findbugs_translate_checkstyle_format","full_name":"noboru-i/findbugs_translate_checkstyle_format","owner":{"login":"noboru-i","id":1567757,"avatar_url":"https://avatars.githubusercontent.com/u/1567757?v=3","gravatar_id":"","url":"https://api.github.com/users/noboru-i","html_url":"https://github.com/noboru-i","followers_url":"https://api.github.com/users/noboru-i/followers","following_url":"https://api.github.com/users/noboru-i/following{/other_user}","gists_url":"https://api.github.com/users/noboru-i/gists{/gist_id}","starred_url":"https://api.github.com/users/noboru-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noboru-i/subscriptions","organizations_url":"https://api.github.com/users/noboru-i/orgs","repos_url":"https://api.github.com/users/noboru-i/repos","events_url":"https://api.github.com/users/noboru-i/events{/privacy}","received_events_url":"https://api.github.com/users/noboru-i/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format","description":"Translate findbugs format into checkstyle format.","fork":false,"url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format","forks_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/forks","keys_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/teams","hooks_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/hooks","issue_events_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/events{/number}","events_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/events","assignees_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/assignees{/user}","branches_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/branches{/branch}","tags_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/tags","blobs_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/refs{/sha}","trees_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/statuses/{sha}","languages_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/languages","stargazers_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/stargazers","contributors_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/contributors","subscribers_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/subscribers","subscription_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/subscription","commits_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/commits{/sha}","git_commits_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/git/commits{/sha}","comments_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/comments{/number}","issue_comment_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/comments{/number}","contents_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/contents/{+path}","compare_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/merges","archive_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/downloads","issues_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues{/number}","pulls_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls{/number}","milestones_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/milestones{/number}","notifications_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/labels{/name}","releases_url":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/releases{/id}","created_at":"2015-06-10T08:58:25Z","updated_at":"2015-06-10T08:59:46Z","pushed_at":"2015-09-01T06:42:07Z","git_url":"git://github.com/noboru-i/findbugs_translate_checkstyle_format.git","ssh_url":"git@github.com:noboru-i/findbugs_translate_checkstyle_format.git","clone_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format.git","svn_url":"https://github.com/noboru-i/findbugs_translate_checkstyle_format","homepage":null,"size":125,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1"},"html":{"href":"https://github.com/noboru-i/findbugs_translate_checkstyle_format/pull/1"},"issue":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/1"},"comments":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/noboru-i/findbugs_translate_checkstyle_format/statuses/40353e5a0dd6ce51f1877b02707fa6fc03cd4e45"}}}}