{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/218953051","pull_request_review_id":157008319,"id":218953051,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODk1MzA1MQ==","diff_hunk":"@@ -0,0 +1,64 @@\n+﻿// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.\n+\n+using Microsoft.CodeAnalysis.CodeStyle;\n+using Microsoft.CodeAnalysis.Diagnostics;\n+using Microsoft.CodeAnalysis.Text;\n+\n+namespace Microsoft.CodeAnalysis.Formatting\n+{\n+    [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]\n+    internal class AbstractFormattingDiagnosticAnalyzer\n+        : AbstractCodeStyleDiagnosticAnalyzer\n+    {\n+        public AbstractFormattingDiagnosticAnalyzer()\n+            : base(\n+                IDEDiagnosticIds.FormattingDiagnosticId,\n+                new LocalizableResourceString(nameof(FeaturesResources.Formatting_document), FeaturesResources.ResourceManager, typeof(FeaturesResources)),\n+                new LocalizableResourceString(nameof(FeaturesResources.Formatting_document), FeaturesResources.ResourceManager, typeof(FeaturesResources)))\n+        {\n+        }\n+\n+        public override DiagnosticAnalyzerCategory GetAnalyzerCategory()\n+            => DiagnosticAnalyzerCategory.SyntaxAnalysis;\n+\n+        public override bool OpenFileOnly(Workspace workspace)\n+            => false;\n+\n+        protected override void InitializeWorker(AnalysisContext context)\n+            => context.RegisterSyntaxTreeAction(AnalyzeSyntaxTree);\n+\n+        private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context)\n+        {\n+            if (!(context.Options is WorkspaceAnalyzerOptions workspaceAnalyzerOptions))\n+            {\n+                return;\n+            }\n+\n+            var options = context.Options.GetDocumentOptionSetAsync(context.Tree, context.CancellationToken).GetAwaiter().GetResult();\n+            if (options == null)\n+            {\n+                return;\n+            }\n+\n+            var workspace = workspaceAnalyzerOptions.Services.Workspace;\n+            var formattingChanges = Formatter.GetFormattedTextChanges(context.Tree.GetRoot(context.CancellationToken), workspace, options, context.CancellationToken);\n+            foreach (var change in formattingChanges)","path":"src/Features/Core/Portable/Formatting/AbstractFormattingDiagnosticAnalyzer.cs","position":null,"original_position":45,"commit_id":"8a8297784cc8993ed4c456034321e1d0cc2a8ca6","original_commit_id":"d821d136cfb05d2909393e3c0e66784e5490931f","user":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"body":"For the initial experiment, we'll go for the consistency approach. It can be a bit overwhelming the first time it's installed, but it does an outstanding job of providing clear information for incremental use.","created_at":"2018-09-19T20:30:15Z","updated_at":"2018-09-19T20:30:16Z","html_url":"https://github.com/dotnet/roslyn/pull/28873#discussion_r218953051","pull_request_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28873","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments/218953051"},"html":{"href":"https://github.com/dotnet/roslyn/pull/28873#discussion_r218953051"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28873"}},"in_reply_to_id":205862558},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn/pulls/28873","id":204490536,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NDkwNTM2","html_url":"https://github.com/dotnet/roslyn/pull/28873","diff_url":"https://github.com/dotnet/roslyn/pull/28873.diff","patch_url":"https://github.com/dotnet/roslyn/pull/28873.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/28873","number":28873,"state":"open","locked":false,"title":"Formatting analyzer","user":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-27T17:15:32Z","updated_at":"2018-09-19T20:30:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca160da47f9b9c2eedbbe245c95006243242f2d6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[{"name":"roslyn-compiler","id":1803172,"node_id":"MDQ6VGVhbTE4MDMxNzI=","slug":"roslyn-compiler","description":"Roslyn Compiler Team","privacy":"closed","url":"https://api.github.com/teams/1803172","members_url":"https://api.github.com/teams/1803172/members{/member}","repositories_url":"https://api.github.com/teams/1803172/repos","permission":"pull"},{"name":"roslyn-infrastructure","id":1823403,"node_id":"MDQ6VGVhbTE4MjM0MDM=","slug":"roslyn-infrastructure","description":"Permanent and temporary Roslyn infrastructure swat team members","privacy":"closed","url":"https://api.github.com/teams/1823403","members_url":"https://api.github.com/teams/1823403/members{/member}","repositories_url":"https://api.github.com/teams/1823403/repos","permission":"pull"}],"labels":[{"id":166377917,"node_id":"MDU6TGFiZWwxNjYzNzc5MTc=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false},{"id":912763567,"node_id":"MDU6TGFiZWw5MTI3NjM1Njc=","url":"https://api.github.com/repos/dotnet/roslyn/labels/Need%20Design%20Review","name":"Need Design Review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28873/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn/pulls/28873/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/28873/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/8a8297784cc8993ed4c456034321e1d0cc2a8ca6","head":{"label":"sharwell:formatting-analyzer","ref":"formatting-analyzer","sha":"8a8297784cc8993ed4c456034321e1d0cc2a8ca6","user":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"repo":{"id":29280707,"node_id":"MDEwOlJlcG9zaXRvcnkyOTI4MDcwNw==","name":"roslyn","full_name":"sharwell/roslyn","private":false,"owner":{"login":"sharwell","id":1408396,"node_id":"MDQ6VXNlcjE0MDgzOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/1408396?v=4","gravatar_id":"","url":"https://api.github.com/users/sharwell","html_url":"https://github.com/sharwell","followers_url":"https://api.github.com/users/sharwell/followers","following_url":"https://api.github.com/users/sharwell/following{/other_user}","gists_url":"https://api.github.com/users/sharwell/gists{/gist_id}","starred_url":"https://api.github.com/users/sharwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharwell/subscriptions","organizations_url":"https://api.github.com/users/sharwell/orgs","repos_url":"https://api.github.com/users/sharwell/repos","events_url":"https://api.github.com/users/sharwell/events{/privacy}","received_events_url":"https://api.github.com/users/sharwell/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sharwell/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":true,"url":"https://api.github.com/repos/sharwell/roslyn","forks_url":"https://api.github.com/repos/sharwell/roslyn/forks","keys_url":"https://api.github.com/repos/sharwell/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharwell/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharwell/roslyn/teams","hooks_url":"https://api.github.com/repos/sharwell/roslyn/hooks","issue_events_url":"https://api.github.com/repos/sharwell/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/sharwell/roslyn/events","assignees_url":"https://api.github.com/repos/sharwell/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/sharwell/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/sharwell/roslyn/tags","blobs_url":"https://api.github.com/repos/sharwell/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharwell/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharwell/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharwell/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharwell/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/sharwell/roslyn/languages","stargazers_url":"https://api.github.com/repos/sharwell/roslyn/stargazers","contributors_url":"https://api.github.com/repos/sharwell/roslyn/contributors","subscribers_url":"https://api.github.com/repos/sharwell/roslyn/subscribers","subscription_url":"https://api.github.com/repos/sharwell/roslyn/subscription","commits_url":"https://api.github.com/repos/sharwell/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharwell/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharwell/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharwell/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharwell/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/sharwell/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharwell/roslyn/merges","archive_url":"https://api.github.com/repos/sharwell/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharwell/roslyn/downloads","issues_url":"https://api.github.com/repos/sharwell/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/sharwell/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/sharwell/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/sharwell/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharwell/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/sharwell/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/sharwell/roslyn/deployments","created_at":"2015-01-15T04:27:54Z","updated_at":"2018-08-13T15:18:20Z","pushed_at":"2018-09-19T19:56:11Z","git_url":"git://github.com/sharwell/roslyn.git","ssh_url":"git@github.com:sharwell/roslyn.git","clone_url":"https://github.com/sharwell/roslyn.git","svn_url":"https://github.com/sharwell/roslyn","homepage":"","size":380542,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:dev16.0.x","ref":"dev16.0.x","sha":"5428977a77fc6126088bc34b53c7386c6cb33d1e","user":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","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":29078997,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA3ODk5Nw==","name":"roslyn","full_name":"dotnet/roslyn","private":false,"owner":{"login":"dotnet","id":9141961,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkxNDE5NjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","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},"html_url":"https://github.com/dotnet/roslyn","description":"The .NET Compiler Platform (\"Roslyn\") provides open-source C# and Visual Basic compilers with rich code analysis APIs.","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn","forks_url":"https://api.github.com/repos/dotnet/roslyn/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn/deployments","created_at":"2015-01-11T02:39:03Z","updated_at":"2018-09-19T17:34:12Z","pushed_at":"2018-09-19T20:27:42Z","git_url":"git://github.com/dotnet/roslyn.git","ssh_url":"git@github.com:dotnet/roslyn.git","clone_url":"https://github.com/dotnet/roslyn.git","svn_url":"https://github.com/dotnet/roslyn","homepage":"","size":451185,"stargazers_count":9858,"watchers_count":9858,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2353,"mirror_url":null,"archived":false,"open_issues_count":5178,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2353,"open_issues":5178,"watchers":9858,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28873"},"html":{"href":"https://github.com/dotnet/roslyn/pull/28873"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/28873"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn/issues/28873/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28873/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn/pulls/28873/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn/statuses/8a8297784cc8993ed4c456034321e1d0cc2a8ca6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sharwell"}}