{"action":"created","issue":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1123","labels_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1123/labels{/name}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1123/comments","events_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1123/events","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1123","id":99238125,"number":1123,"title":"SA1204 incorrectly reported when private static method follows non-private instance method","user":{"login":"oatkins","id":10925800,"avatar_url":"https://avatars.githubusercontent.com/u/10925800?v=3","gravatar_id":"","url":"https://api.github.com/users/oatkins","html_url":"https://github.com/oatkins","followers_url":"https://api.github.com/users/oatkins/followers","following_url":"https://api.github.com/users/oatkins/following{/other_user}","gists_url":"https://api.github.com/users/oatkins/gists{/gist_id}","starred_url":"https://api.github.com/users/oatkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oatkins/subscriptions","organizations_url":"https://api.github.com/users/oatkins/orgs","repos_url":"https://api.github.com/users/oatkins/repos","events_url":"https://api.github.com/users/oatkins/events{/privacy}","received_events_url":"https://api.github.com/users/oatkins/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/labels/needs%20discussion","name":"needs discussion","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-08-05T15:57:57Z","updated_at":"2015-08-05T20:21:14Z","closed_at":null,"body":"The following code should not report SA1204, but actually reports it multiple times:\r\n\r\n    public class TestClass\r\n    {\r\n        public static void A1() { }\r\n        public void A2() { }\r\n        internal static void A3() { }\r\n        internal void A4() { }\r\n        protected static void A5() { }\r\n        protected void A6() { }\r\n        private static void A7() { }\r\n        static void A7a() { }\r\n        private void A8() { }\r\n        void A8a() { }\r\n    }\r\n\r\nI think that the following changes would fix the code:\r\n\r\n- constants and static fields should be treated as the same from the standpoint of this rule (since SA1203 handles that distinction),\r\n\r\n- in the `HandleMemberList()` method, each time the access level changes *or* each time the \"syntax kind\" changes, `previousMemberStatic` should be reset to `true`.\r\n\r\nI'm close to a fix for this."},"comment":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/comments/128135620","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1123#issuecomment-128135620","issue_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1123","id":128135620,"user":{"login":"sharwell","id":1408396,"avatar_url":"https://avatars.githubusercontent.com/u/1408396?v=3","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},"created_at":"2015-08-05T20:21:14Z","updated_at":"2015-08-05T20:21:14Z","body":"I'm torn when it comes to properties/methods, but for fields I just completely disagree with that ordering. I always want to see all constants, then all static, then all instance.\r\n\r\nAlso it makes no sense for `protected internal` to appear after `internal`, because it is strictly *more* visible. But that's a completely separate issue from this."}}