{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/comments/54494746","id":54494746,"diff_hunk":"@@ -12,12 +10,295 @@ public class DoNotDecreaseInheritedMemberVisibilityTests : DiagnosticAnalyzerTes\n     {\n         protected override DiagnosticAnalyzer GetBasicDiagnosticAnalyzer()\n         {\n-            return new BasicDoNotDecreaseInheritedMemberVisibilityAnalyzer();\n+            return new DoNotDecreaseInheritedMemberVisibilityAnalyzer();\n         }\n \n         protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()\n         {\n-            return new CSharpDoNotDecreaseInheritedMemberVisibilityAnalyzer();\n+            return new DoNotDecreaseInheritedMemberVisibilityAnalyzer();\n+        }\n+\n+        [Fact]\n+        public void DecreaseCSharpMemberVisibility()\n+        {\n+            VerifyCSharp(\n+@\"public class BaseClass\n+{\n+    public int MyProp3;\n+}\n+\n+public class DerivedClass : BaseClass\n+{\n+    private new int MyProp3;\n+}\", GetCSharpCA2222RuleNameResultAt(8, 21));\n+\n+            VerifyCSharp(\n+@\"public class BaseClass\n+{\n+    public int MyProp3 { get; set; }\n+}\n+\n+public class DerivedClass : BaseClass\n+{\n+    internal new int MyProp3 { get; set; }\n+}\", GetCSharpCA2222RuleNameResultAt(8, 22), GetCSharpCA2222RuleNameResultAt(8, 32), GetCSharpCA2222RuleNameResultAt(8, 37));","path":"src/Microsoft.ApiDesignGuidelines.Analyzers/UnitTests/DoNotDecreaseInheritedMemberVisibilityTests.cs","position":45,"original_position":47,"commit_id":"bec59410a0f67b7500997dd1cf7d28011194ebb7","original_commit_id":"861dcd6924a730d7fcc74a7c49247716c0ab5979","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"body":"Ok, got it. Thanks, @lgolding. It's awkward because there's really not a userful code fix to be made at the accessor level, so I think what I'll do for now is:\r\n\r\n1. Only report a diagnostic for methods (or accessors) so that we have FxCop parity.\r\n2. Not offer a code fix on any accessors that don't have an explicit visibility. In the future, if we update this to fire on the property, instead, then that code fix will be available.","created_at":"2016-02-29T22:58:32Z","updated_at":"2016-02-29T22:58:32Z","html_url":"https://github.com/dotnet/roslyn-analyzers/pull/828#discussion_r54494746","pull_request_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828","_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/comments/54494746"},"html":{"href":"https://github.com/dotnet/roslyn-analyzers/pull/828#discussion_r54494746"},"pull_request":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828","id":58150675,"html_url":"https://github.com/dotnet/roslyn-analyzers/pull/828","diff_url":"https://github.com/dotnet/roslyn-analyzers/pull/828.diff","patch_url":"https://github.com/dotnet/roslyn-analyzers/pull/828.patch","issue_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/828","number":828,"state":"open","locked":false,"title":"Add analyzer and code fix for CA2222: Do not decrease inherited member visibility","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-03T15:14:53Z","updated_at":"2016-02-29T22:58:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4da4ef727f071dfb0aca23081c1419974383696d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828/commits","review_comments_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828/comments","review_comment_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/828/comments","statuses_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/statuses/bec59410a0f67b7500997dd1cf7d28011194ebb7","head":{"label":"mjrousos:CA2222","ref":"CA2222","sha":"bec59410a0f67b7500997dd1cf7d28011194ebb7","user":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"repo":{"id":47643431,"name":"roslyn-analyzers","full_name":"mjrousos/roslyn-analyzers","owner":{"login":"mjrousos","id":10077254,"avatar_url":"https://avatars.githubusercontent.com/u/10077254?v=3","gravatar_id":"","url":"https://api.github.com/users/mjrousos","html_url":"https://github.com/mjrousos","followers_url":"https://api.github.com/users/mjrousos/followers","following_url":"https://api.github.com/users/mjrousos/following{/other_user}","gists_url":"https://api.github.com/users/mjrousos/gists{/gist_id}","starred_url":"https://api.github.com/users/mjrousos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjrousos/subscriptions","organizations_url":"https://api.github.com/users/mjrousos/orgs","repos_url":"https://api.github.com/users/mjrousos/repos","events_url":"https://api.github.com/users/mjrousos/events{/privacy}","received_events_url":"https://api.github.com/users/mjrousos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mjrousos/roslyn-analyzers","description":"","fork":true,"url":"https://api.github.com/repos/mjrousos/roslyn-analyzers","forks_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/forks","keys_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/teams","hooks_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/hooks","issue_events_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/issues/events{/number}","events_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/events","assignees_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/assignees{/user}","branches_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/branches{/branch}","tags_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/tags","blobs_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/statuses/{sha}","languages_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/languages","stargazers_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/stargazers","contributors_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/contributors","subscribers_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/subscribers","subscription_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/subscription","commits_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/contents/{+path}","compare_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/merges","archive_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/downloads","issues_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/issues{/number}","pulls_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/pulls{/number}","milestones_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/milestones{/number}","notifications_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/labels{/name}","releases_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/releases{/id}","deployments_url":"https://api.github.com/repos/mjrousos/roslyn-analyzers/deployments","created_at":"2015-12-08T19:10:42Z","updated_at":"2016-02-29T19:13:47Z","pushed_at":"2016-02-29T19:32:50Z","git_url":"git://github.com/mjrousos/roslyn-analyzers.git","ssh_url":"git@github.com:mjrousos/roslyn-analyzers.git","clone_url":"https://github.com/mjrousos/roslyn-analyzers.git","svn_url":"https://github.com/mjrousos/roslyn-analyzers","homepage":null,"size":6400,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"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:master","ref":"master","sha":"0dc936741488a8b3116f350ea0689e1b4408c169","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":36946704,"name":"roslyn-analyzers","full_name":"dotnet/roslyn-analyzers","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/roslyn-analyzers","description":"","fork":false,"url":"https://api.github.com/repos/dotnet/roslyn-analyzers","forks_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/forks","keys_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/teams","hooks_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/hooks","issue_events_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/events","assignees_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/tags","blobs_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/languages","stargazers_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/stargazers","contributors_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/contributors","subscribers_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/subscribers","subscription_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/subscription","commits_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/merges","archive_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/downloads","issues_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/deployments","created_at":"2015-06-05T17:48:07Z","updated_at":"2016-02-27T21:09:33Z","pushed_at":"2016-02-29T22:55:08Z","git_url":"git://github.com/dotnet/roslyn-analyzers.git","ssh_url":"git@github.com:dotnet/roslyn-analyzers.git","clone_url":"https://github.com/dotnet/roslyn-analyzers.git","svn_url":"https://github.com/dotnet/roslyn-analyzers","homepage":null,"size":8211,"stargazers_count":79,"watchers_count":79,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":187,"forks":70,"open_issues":187,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828"},"html":{"href":"https://github.com/dotnet/roslyn-analyzers/pull/828"},"issue":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/828"},"comments":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/828/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/pulls/828/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/roslyn-analyzers/statuses/bec59410a0f67b7500997dd1cf7d28011194ebb7"}}}}