{"action":"created","issue":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/605","labels_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/605/comments","events_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/605/events","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/605","id":66200002,"number":605,"title":"Declarations (method/class/property/namespace/etc) must not contain embedded comments","user":{"login":"macpak","id":1065792,"avatar_url":"https://avatars.githubusercontent.com/u/1065792?v=3","gravatar_id":"","url":"https://api.github.com/users/macpak","html_url":"https://github.com/macpak","followers_url":"https://api.github.com/users/macpak/followers","following_url":"https://api.github.com/users/macpak/following{/other_user}","gists_url":"https://api.github.com/users/macpak/gists{/gist_id}","starred_url":"https://api.github.com/users/macpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macpak/subscriptions","organizations_url":"https://api.github.com/users/macpak/orgs","repos_url":"https://api.github.com/users/macpak/repos","events_url":"https://api.github.com/users/macpak/events{/privacy}","received_events_url":"https://api.github.com/users/macpak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/labels/needs%20discussion","name":"needs discussion","color":"f7c6c7"},{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/labels/new%20rule","name":"new rule","color":"207de5"},{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/labels/proposal","name":"proposal","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-03T18:03:50Z","updated_at":"2015-04-03T21:53:16Z","closed_at":null,"body":"I would like to propose a new diagnostic:\r\n\r\nCategory: ReadabilityRules\r\nRule: Declarations must not contain embedded comments\r\nDescription: When declaring a class/method/namespace/property, we shouldn't allow to put a comment between the declaration and the opening curly bracket\r\n\r\nRationale: In #42 we catch situations where a commment is put between a statement and the opening curly bracket. I think the same rule should apply to declarations. For example, code above should not be allowed:\r\n      \r\n    public class IndexTests\r\n    //aa\r\n    {\r\n        public int Prop\r\n        //aa\r\n        {\r\n            get\r\n            //bb\r\n            {\r\n                return 0;\r\n            }\r\n\r\n            set\r\n            //cc\r\n            {\r\n\r\n            }\r\n        }\r\n      }"},"comment":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/comments/89431572","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/605#issuecomment-89431572","issue_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/605","id":89431572,"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-04-03T21:53:16Z","updated_at":"2015-04-03T21:53:16Z","body":"@Przemyslaw-W Thanks for your feedback.\r\n\r\n> I am not an contributor here\r\n\r\nAll it takes to be a contributor here is providing feedback. :+1: \r\n\r\n> For these reasons, for new rules, I would just go with SA followed by next available number in category.\r\n\r\nEverything you wrote makes perfect sense. Since the primary reason for a \"trial\" identifier and \"promotion\" would be making sure more people give feedback before finalizing a rule, how would you feel about keeping a trial period, but adding a statement that a rule will be promoted to its final form *before* it gets included in a stable release (e.g. 1.0.0 is stable but 1.0 Alpha 5 is a preview release). More specifically:\r\n\r\n#### [Proposed Rule:] The identifier for a diagnostic cannot change after the diagnostic is enabled by default in a stable release.\r\n\r\nEven if we assign SA rules from the start for new diagnostics, I think the above rule is a good idea to document (and of course follow)."}}