{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/codeformatter/pulls/comments/35701667","id":35701667,"diff_hunk":"@@ -126,6 +126,15 @@\n   <data name=\"ExplicitThisFixer_Title\" xml:space=\"preserve\">\n     <value>Remove 'this' qualifier</value>\n   </data>\n+  <data name=\"ExplicitVariableTypeAnalyzer_MessageFormat\" xml:space=\"preserve\">\n+    <value>Use VariableTypeDeclaration</value>\n+  </data>\n+  <data name=\"ExplicitVariableTypeAnalyzer_Title\" xml:space=\"preserve\">\n+    <value>Variable '{0}' should be declared with explicit type </value>","path":"src/Microsoft.DotNet.CodeFormatting/Resources.resx","position":8,"original_position":8,"commit_id":"489a5f77829c5224f982985b38af47e5ab2d8a29","original_commit_id":"489a5f77829c5224f982985b38af47e5ab2d8a29","user":{"login":"genlu","id":788783,"avatar_url":"https://avatars.githubusercontent.com/u/788783?v=3","gravatar_id":"","url":"https://api.github.com/users/genlu","html_url":"https://github.com/genlu","followers_url":"https://api.github.com/users/genlu/followers","following_url":"https://api.github.com/users/genlu/following{/other_user}","gists_url":"https://api.github.com/users/genlu/gists{/gist_id}","starred_url":"https://api.github.com/users/genlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genlu/subscriptions","organizations_url":"https://api.github.com/users/genlu/orgs","repos_url":"https://api.github.com/users/genlu/repos","events_url":"https://api.github.com/users/genlu/events{/privacy}","received_events_url":"https://api.github.com/users/genlu/received_events","type":"User","site_admin":false},"body":"@lgolding Fixed.","created_at":"2015-07-28T21:11:08Z","updated_at":"2015-07-28T21:11:08Z","html_url":"https://github.com/dotnet/codeformatter/pull/155#discussion_r35701667","pull_request_url":"https://api.github.com/repos/dotnet/codeformatter/pulls/155","_links":{"self":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/comments/35701667"},"html":{"href":"https://github.com/dotnet/codeformatter/pull/155#discussion_r35701667"},"pull_request":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/155"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/codeformatter/pulls/155","id":41051346,"html_url":"https://github.com/dotnet/codeformatter/pull/155","diff_url":"https://github.com/dotnet/codeformatter/pull/155.diff","patch_url":"https://github.com/dotnet/codeformatter/pull/155.patch","issue_url":"https://api.github.com/repos/dotnet/codeformatter/issues/155","number":155,"state":"open","locked":false,"title":"Add ExplicitVariableTypeAnalyzer and ExplicitVariableTypeFixer","user":{"login":"genlu","id":788783,"avatar_url":"https://avatars.githubusercontent.com/u/788783?v=3","gravatar_id":"","url":"https://api.github.com/users/genlu","html_url":"https://github.com/genlu","followers_url":"https://api.github.com/users/genlu/followers","following_url":"https://api.github.com/users/genlu/following{/other_user}","gists_url":"https://api.github.com/users/genlu/gists{/gist_id}","starred_url":"https://api.github.com/users/genlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genlu/subscriptions","organizations_url":"https://api.github.com/users/genlu/orgs","repos_url":"https://api.github.com/users/genlu/repos","events_url":"https://api.github.com/users/genlu/events{/privacy}","received_events_url":"https://api.github.com/users/genlu/received_events","type":"User","site_admin":false},"body":"Add ExplicitVariableTypeAnalyzer and ExplicitVariableTypeFixer\r\n\r\n- ExplicitVariableTypeAnalyzer reports a diagnostic when keyword 'var' is used in variable declaration where it could be replaced by an explicit type.\r\n- ExplicitVariableTypeFixer replaces the usage of 'var' reported by ExplicitVariableTypeAnalyzer with an explicit type.\r\n- There's a couple issues need to be addressed:\r\n  - I couldn't figure out how to let Roslyn automatically simplify System types to keywords (e.g. Int32 => int, String => string, etc.), I thought WithAdditionalAnnotations(Simplifier.Annotation) would do the trick, but it doesn't work.\r\n  - Currently, the analyzer fires on all the usages of 'var' (except objects with anonymous type). But it probably needs to hold the trigger when it is obvious what the type is (this is what in .NET C# coding style). For example:` var foo = new Foo();` and `var x = (Foo)y;` should be OK. This will be addressed in another PR.\r\n\r\n@lgolding @jaredpar @Priya91 \r\n\r\n","created_at":"2015-07-28T19:38:01Z","updated_at":"2015-07-28T21:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b1c1e7b542d16797c624cf1446e5dce75d65cd9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/codeformatter/pulls/155/commits","review_comments_url":"https://api.github.com/repos/dotnet/codeformatter/pulls/155/comments","review_comment_url":"https://api.github.com/repos/dotnet/codeformatter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/codeformatter/issues/155/comments","statuses_url":"https://api.github.com/repos/dotnet/codeformatter/statuses/489a5f77829c5224f982985b38af47e5ab2d8a29","head":{"label":"genlu:anfixAddExplicitVariableTypeAnalyzer","ref":"anfixAddExplicitVariableTypeAnalyzer","sha":"489a5f77829c5224f982985b38af47e5ab2d8a29","user":{"login":"genlu","id":788783,"avatar_url":"https://avatars.githubusercontent.com/u/788783?v=3","gravatar_id":"","url":"https://api.github.com/users/genlu","html_url":"https://github.com/genlu","followers_url":"https://api.github.com/users/genlu/followers","following_url":"https://api.github.com/users/genlu/following{/other_user}","gists_url":"https://api.github.com/users/genlu/gists{/gist_id}","starred_url":"https://api.github.com/users/genlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genlu/subscriptions","organizations_url":"https://api.github.com/users/genlu/orgs","repos_url":"https://api.github.com/users/genlu/repos","events_url":"https://api.github.com/users/genlu/events{/privacy}","received_events_url":"https://api.github.com/users/genlu/received_events","type":"User","site_admin":false},"repo":{"id":39422431,"name":"codeformatter","full_name":"genlu/codeformatter","owner":{"login":"genlu","id":788783,"avatar_url":"https://avatars.githubusercontent.com/u/788783?v=3","gravatar_id":"","url":"https://api.github.com/users/genlu","html_url":"https://github.com/genlu","followers_url":"https://api.github.com/users/genlu/followers","following_url":"https://api.github.com/users/genlu/following{/other_user}","gists_url":"https://api.github.com/users/genlu/gists{/gist_id}","starred_url":"https://api.github.com/users/genlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genlu/subscriptions","organizations_url":"https://api.github.com/users/genlu/orgs","repos_url":"https://api.github.com/users/genlu/repos","events_url":"https://api.github.com/users/genlu/events{/privacy}","received_events_url":"https://api.github.com/users/genlu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/genlu/codeformatter","description":"Tool that uses Roslyn to automatically rewrite the source to follow our coding styles","fork":true,"url":"https://api.github.com/repos/genlu/codeformatter","forks_url":"https://api.github.com/repos/genlu/codeformatter/forks","keys_url":"https://api.github.com/repos/genlu/codeformatter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/genlu/codeformatter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/genlu/codeformatter/teams","hooks_url":"https://api.github.com/repos/genlu/codeformatter/hooks","issue_events_url":"https://api.github.com/repos/genlu/codeformatter/issues/events{/number}","events_url":"https://api.github.com/repos/genlu/codeformatter/events","assignees_url":"https://api.github.com/repos/genlu/codeformatter/assignees{/user}","branches_url":"https://api.github.com/repos/genlu/codeformatter/branches{/branch}","tags_url":"https://api.github.com/repos/genlu/codeformatter/tags","blobs_url":"https://api.github.com/repos/genlu/codeformatter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/genlu/codeformatter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/genlu/codeformatter/git/refs{/sha}","trees_url":"https://api.github.com/repos/genlu/codeformatter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/genlu/codeformatter/statuses/{sha}","languages_url":"https://api.github.com/repos/genlu/codeformatter/languages","stargazers_url":"https://api.github.com/repos/genlu/codeformatter/stargazers","contributors_url":"https://api.github.com/repos/genlu/codeformatter/contributors","subscribers_url":"https://api.github.com/repos/genlu/codeformatter/subscribers","subscription_url":"https://api.github.com/repos/genlu/codeformatter/subscription","commits_url":"https://api.github.com/repos/genlu/codeformatter/commits{/sha}","git_commits_url":"https://api.github.com/repos/genlu/codeformatter/git/commits{/sha}","comments_url":"https://api.github.com/repos/genlu/codeformatter/comments{/number}","issue_comment_url":"https://api.github.com/repos/genlu/codeformatter/issues/comments{/number}","contents_url":"https://api.github.com/repos/genlu/codeformatter/contents/{+path}","compare_url":"https://api.github.com/repos/genlu/codeformatter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/genlu/codeformatter/merges","archive_url":"https://api.github.com/repos/genlu/codeformatter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/genlu/codeformatter/downloads","issues_url":"https://api.github.com/repos/genlu/codeformatter/issues{/number}","pulls_url":"https://api.github.com/repos/genlu/codeformatter/pulls{/number}","milestones_url":"https://api.github.com/repos/genlu/codeformatter/milestones{/number}","notifications_url":"https://api.github.com/repos/genlu/codeformatter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/genlu/codeformatter/labels{/name}","releases_url":"https://api.github.com/repos/genlu/codeformatter/releases{/id}","created_at":"2015-07-21T03:42:40Z","updated_at":"2015-07-21T03:42:42Z","pushed_at":"2015-07-28T07:12:21Z","git_url":"git://github.com/genlu/codeformatter.git","ssh_url":"git@github.com:genlu/codeformatter.git","clone_url":"https://github.com/genlu/codeformatter.git","svn_url":"https://github.com/genlu/codeformatter","homepage":"","size":768,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:anfix","ref":"anfix","sha":"db62251dc611a9537afba058f5983536aa133051","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28896487,"name":"codeformatter","full_name":"dotnet/codeformatter","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/codeformatter","description":"Tool that uses Roslyn to automatically rewrite the source to follow our coding styles","fork":false,"url":"https://api.github.com/repos/dotnet/codeformatter","forks_url":"https://api.github.com/repos/dotnet/codeformatter/forks","keys_url":"https://api.github.com/repos/dotnet/codeformatter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/codeformatter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/codeformatter/teams","hooks_url":"https://api.github.com/repos/dotnet/codeformatter/hooks","issue_events_url":"https://api.github.com/repos/dotnet/codeformatter/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/codeformatter/events","assignees_url":"https://api.github.com/repos/dotnet/codeformatter/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/codeformatter/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/codeformatter/tags","blobs_url":"https://api.github.com/repos/dotnet/codeformatter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/codeformatter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/codeformatter/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/codeformatter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/codeformatter/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/codeformatter/languages","stargazers_url":"https://api.github.com/repos/dotnet/codeformatter/stargazers","contributors_url":"https://api.github.com/repos/dotnet/codeformatter/contributors","subscribers_url":"https://api.github.com/repos/dotnet/codeformatter/subscribers","subscription_url":"https://api.github.com/repos/dotnet/codeformatter/subscription","commits_url":"https://api.github.com/repos/dotnet/codeformatter/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/codeformatter/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/codeformatter/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/codeformatter/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/codeformatter/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/codeformatter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/codeformatter/merges","archive_url":"https://api.github.com/repos/dotnet/codeformatter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/codeformatter/downloads","issues_url":"https://api.github.com/repos/dotnet/codeformatter/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/codeformatter/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/codeformatter/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/codeformatter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/codeformatter/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/codeformatter/releases{/id}","created_at":"2015-01-07T03:28:44Z","updated_at":"2015-07-28T14:45:11Z","pushed_at":"2015-07-28T19:38:02Z","git_url":"git://github.com/dotnet/codeformatter.git","ssh_url":"git@github.com:dotnet/codeformatter.git","clone_url":"https://github.com/dotnet/codeformatter.git","svn_url":"https://github.com/dotnet/codeformatter","homepage":"","size":1681,"stargazers_count":425,"watchers_count":425,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":78,"mirror_url":null,"open_issues_count":51,"forks":78,"open_issues":51,"watchers":425,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/155"},"html":{"href":"https://github.com/dotnet/codeformatter/pull/155"},"issue":{"href":"https://api.github.com/repos/dotnet/codeformatter/issues/155"},"comments":{"href":"https://api.github.com/repos/dotnet/codeformatter/issues/155/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/155/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/codeformatter/pulls/155/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/codeformatter/statuses/489a5f77829c5224f982985b38af47e5ab2d8a29"}}}}