{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/comments/187121373","pull_request_review_id":118837864,"id":187121373,"diff_hunk":"@@ -317,60 +334,65 @@ public void SarifTransformerTests_ToCurrent_OneRunWitRules()\n \n             SarifLog v2Log = TransformVersionOneToCurrent(v1LogText);\n \n-            v2Log.Runs.Should().NotBeNull();\n-            v2Log.Runs.Count.Should().Be(1);\n-\n-            Run run = v2Log.Runs[0];\n-\n-            run.Resources.Should().NotBeNull();\n-            run.Resources.Rules.Should().NotBeNull();\n-            run.Resources.Rules.Count.Should().Be(3);\n-\n-            Rule rule = run.Resources.Rules[\"C2001\"];\n-\n-            rule.Id.Should().Be(\"C2001\");\n-            rule.Name.Should().BeNull();\n-            rule.ShortDescription.Should().NotBeNull();\n-            rule.ShortDescription.Text.Should().Be(\"A variable was used without being initialized.\");\n-            rule.FullDescription.Should().BeNull();\n-            rule.Configuration.Should().BeNull();\n-            rule.HelpLocation.Should().BeNull();\n-            rule.MessageStrings.Should().NotBeNull();\n-            rule.MessageStrings.Count.Should().Be(1);\n-            rule.MessageStrings[\"default\"].Should().Be(\"Variable \\\"{0}\\\" was used without being initialized.\");\n-            rule.Properties.Should().NotBeNull();\n-            rule.Properties[\"some_key\"].SerializedValue.Should().Be(\"\\\"FoxForceFive\\\"\");\n-\n-            rule = run.Resources.Rules[\"C2002\"];\n-\n-            rule.Id.Should().Be(\"C2002\");\n-            rule.Name.Should().BeNull();\n-            rule.ShortDescription.Should().BeNull();\n-            rule.FullDescription.Should().NotBeNull();\n-            rule.FullDescription.Text.Should().Be(\"Catfish season continuous hen lamb include dose copy grant.\");\n-            rule.Configuration.Should().NotBeNull();\n-            rule.Configuration.Enabled.Should().Be(true);\n-            rule.Configuration.DefaultLevel.Should().Be(RuleConfigurationDefaultLevel.Error);\n-            rule.HelpLocation.Should().NotBeNull();\n-            rule.HelpLocation.Uri.ToString().Should().Be(\"http://www.domain.com/rules/c2002.html\");\n-            rule.MessageStrings.Should().BeNull();\n-            rule.Properties.Should().BeNull();\n-\n-            rule = run.Resources.Rules[\"C2003\"];\n-\n-            rule.Id.Should().Be(\"C2003\");\n-            rule.Name.Should().NotBeNull();\n-            rule.Name.Text.Should().Be(\"Rule C2003\");\n-            rule.ShortDescription.Should().NotBeNull();\n-            rule.ShortDescription.Text.Should().Be(\"Rules were meant to be broken.\");\n-            rule.FullDescription.Should().NotBeNull();\n-            rule.FullDescription.Text.Should().Be(\"Rent internal rebellion competence biography photograph.\");\n-            rule.Configuration.Should().NotBeNull();\n-            rule.Configuration.Enabled.Should().Be(false);\n-            rule.Configuration.DefaultLevel.Should().Be(RuleConfigurationDefaultLevel.Note);\n-            rule.HelpLocation.Should().BeNull();\n-            rule.MessageStrings.Should().BeNull();\n-            rule.Properties.Should().BeNull();\n+            string v2LogText = JsonConvert.SerializeObject(v2Log, SarifTransformerUtilities.JsonSettingsV2);\n+            string v2LogExpectedText =\n+@\"{\n+  \"\"$schema\"\": \"\"http://json.schemastore.org/sarif-2.0.0\"\",\n+  \"\"version\"\": \"\"2.0.0\"\",\n+  \"\"runs\"\": [\n+    {\n+      \"\"tool\"\": {\n+        \"\"name\"\": \"\"CodeScanner\"\",\n+        \"\"semanticVersion\"\": \"\"2.1.0\"\"\n+      },\n+      \"\"results\"\": [],\n+      \"\"resources\"\": {\n+        \"\"rules\"\": {\n+          \"\"C2001\"\": {\n+            \"\"id\"\": \"\"C2001\"\",\n+            \"\"shortDescription\"\": {\n+              \"\"text\"\": \"\"A variable was used without being initialized.\"\"\n+            },\n+            \"\"messageStrings\"\": {\n+              \"\"default\"\": \"\"Variable \\\"\"{0}\\\"\" was used without being initialized.\"\"\n+            },\n+            \"\"properties\"\": {\n+              \"\"some_key\"\": \"\"FoxForceFive\"\"\n+            }\n+          },\n+          \"\"C2002\"\": {\n+            \"\"id\"\": \"\"C2002\"\",\n+            \"\"fullDescription\"\": {\n+              \"\"text\"\": \"\"Catfish season continuous hen lamb include dose copy grant.\"\"\n+            },\n+            \"\"configuration\"\": {\n+              \"\"enabled\"\": true,\n+              \"\"defaultLevel\"\": 2\n+            },\n+            \"\"helpLocation\"\": {\n+              \"\"uri\"\": \"\"http://www.domain.com/rules/c2002.html\"\"\n+            }\n+          },\n+          \"\"C2003\"\": {\n+            \"\"id\"\": \"\"C2003\"\",\n+            \"\"name\"\": {\n+              \"\"text\"\": \"\"Rule C2003\"\"\n+            },\n+            \"\"shortDescription\"\": {\n+              \"\"text\"\": \"\"Rules were meant to be broken.\"\"\n+            },\n+            \"\"fullDescription\"\": {\n+              \"\"text\"\": \"\"Rent internal rebellion competence biography photograph.\"\"\n+            },\n+            \"\"configuration\"\": {}","path":"src/Sarif.UnitTests/SarifVersionOneToCurrentTests.cs","position":383,"original_position":383,"commit_id":"692da5b07850ff33eda4449b693a9615895a519b","original_commit_id":"692da5b07850ff33eda4449b693a9615895a519b","user":{"login":"lgolding","id":11762653,"avatar_url":"https://avatars0.githubusercontent.com/u/11762653?v=4","gravatar_id":"","url":"https://api.github.com/users/lgolding","html_url":"https://github.com/lgolding","followers_url":"https://api.github.com/users/lgolding/followers","following_url":"https://api.github.com/users/lgolding/following{/other_user}","gists_url":"https://api.github.com/users/lgolding/gists{/gist_id}","starred_url":"https://api.github.com/users/lgolding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgolding/subscriptions","organizations_url":"https://api.github.com/users/lgolding/orgs","repos_url":"https://api.github.com/users/lgolding/repos","events_url":"https://api.github.com/users/lgolding/events{/privacy}","received_events_url":"https://api.github.com/users/lgolding/received_events","type":"User","site_admin":false},"body":"Why emit empty object?","created_at":"2018-05-09T17:46:55Z","updated_at":"2018-05-09T17:46:55Z","html_url":"https://github.com/Microsoft/sarif-sdk/pull/881#discussion_r187121373","pull_request_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/comments/187121373"},"html":{"href":"https://github.com/Microsoft/sarif-sdk/pull/881#discussion_r187121373"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881","id":186780469,"html_url":"https://github.com/Microsoft/sarif-sdk/pull/881","diff_url":"https://github.com/Microsoft/sarif-sdk/pull/881.diff","patch_url":"https://github.com/Microsoft/sarif-sdk/pull/881.patch","issue_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/881","number":881,"state":"open","locked":false,"title":"Add utilities class, param name cleanup, tests to new model","user":{"login":"EasyRhin0","id":11556228,"avatar_url":"https://avatars0.githubusercontent.com/u/11556228?v=4","gravatar_id":"","url":"https://api.github.com/users/EasyRhin0","html_url":"https://github.com/EasyRhin0","followers_url":"https://api.github.com/users/EasyRhin0/followers","following_url":"https://api.github.com/users/EasyRhin0/following{/other_user}","gists_url":"https://api.github.com/users/EasyRhin0/gists{/gist_id}","starred_url":"https://api.github.com/users/EasyRhin0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EasyRhin0/subscriptions","organizations_url":"https://api.github.com/users/EasyRhin0/orgs","repos_url":"https://api.github.com/users/EasyRhin0/repos","events_url":"https://api.github.com/users/EasyRhin0/events{/privacy}","received_events_url":"https://api.github.com/users/EasyRhin0/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-08T23:17:14Z","updated_at":"2018-05-09T17:46:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"225e554bd7eb79cca3b2f77b044d1b54f21c2645","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881/commits","review_comments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881/comments","review_comment_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/881/comments","statuses_url":"https://api.github.com/repos/Microsoft/sarif-sdk/statuses/692da5b07850ff33eda4449b693a9615895a519b","head":{"label":"Microsoft:v1-v2-transformer","ref":"v1-v2-transformer","sha":"692da5b07850ff33eda4449b693a9615895a519b","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":45640472,"name":"sarif-sdk","full_name":"Microsoft/sarif-sdk","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/sarif-sdk","description":".NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/sarif-standard/sarif-spec)","fork":false,"url":"https://api.github.com/repos/Microsoft/sarif-sdk","forks_url":"https://api.github.com/repos/Microsoft/sarif-sdk/forks","keys_url":"https://api.github.com/repos/Microsoft/sarif-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/sarif-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/sarif-sdk/teams","hooks_url":"https://api.github.com/repos/Microsoft/sarif-sdk/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/sarif-sdk/events","assignees_url":"https://api.github.com/repos/Microsoft/sarif-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/sarif-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/sarif-sdk/tags","blobs_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/sarif-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/sarif-sdk/languages","stargazers_url":"https://api.github.com/repos/Microsoft/sarif-sdk/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/sarif-sdk/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/sarif-sdk/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/sarif-sdk/subscription","commits_url":"https://api.github.com/repos/Microsoft/sarif-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/sarif-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/sarif-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/sarif-sdk/merges","archive_url":"https://api.github.com/repos/Microsoft/sarif-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/sarif-sdk/downloads","issues_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/sarif-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/sarif-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/sarif-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/sarif-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/deployments","created_at":"2015-11-05T21:26:46Z","updated_at":"2018-04-27T17:19:46Z","pushed_at":"2018-05-08T23:42:07Z","git_url":"git://github.com/Microsoft/sarif-sdk.git","ssh_url":"git@github.com:Microsoft/sarif-sdk.git","clone_url":"https://github.com/Microsoft/sarif-sdk.git","svn_url":"https://github.com/Microsoft/sarif-sdk","homepage":"","size":66060,"stargazers_count":18,"watchers_count":18,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":20,"open_issues":105,"watchers":18,"default_branch":"master"}},"base":{"label":"Microsoft:sarif-v2","ref":"sarif-v2","sha":"68b04b767745b24bbaa8c8249b7a846fea9206d8","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":45640472,"name":"sarif-sdk","full_name":"Microsoft/sarif-sdk","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/sarif-sdk","description":".NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/sarif-standard/sarif-spec)","fork":false,"url":"https://api.github.com/repos/Microsoft/sarif-sdk","forks_url":"https://api.github.com/repos/Microsoft/sarif-sdk/forks","keys_url":"https://api.github.com/repos/Microsoft/sarif-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/sarif-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/sarif-sdk/teams","hooks_url":"https://api.github.com/repos/Microsoft/sarif-sdk/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/sarif-sdk/events","assignees_url":"https://api.github.com/repos/Microsoft/sarif-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/sarif-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/sarif-sdk/tags","blobs_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/sarif-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/sarif-sdk/languages","stargazers_url":"https://api.github.com/repos/Microsoft/sarif-sdk/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/sarif-sdk/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/sarif-sdk/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/sarif-sdk/subscription","commits_url":"https://api.github.com/repos/Microsoft/sarif-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/sarif-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/sarif-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/sarif-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/sarif-sdk/merges","archive_url":"https://api.github.com/repos/Microsoft/sarif-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/sarif-sdk/downloads","issues_url":"https://api.github.com/repos/Microsoft/sarif-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/sarif-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/sarif-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/sarif-sdk/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/sarif-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/sarif-sdk/deployments","created_at":"2015-11-05T21:26:46Z","updated_at":"2018-04-27T17:19:46Z","pushed_at":"2018-05-08T23:42:07Z","git_url":"git://github.com/Microsoft/sarif-sdk.git","ssh_url":"git@github.com:Microsoft/sarif-sdk.git","clone_url":"https://github.com/Microsoft/sarif-sdk.git","svn_url":"https://github.com/Microsoft/sarif-sdk","homepage":"","size":66060,"stargazers_count":18,"watchers_count":18,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":20,"open_issues":105,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881"},"html":{"href":"https://github.com/Microsoft/sarif-sdk/pull/881"},"issue":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/881"},"comments":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/issues/881/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/pulls/881/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/sarif-sdk/statuses/692da5b07850ff33eda4449b693a9615895a519b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"lgolding"}}