{"action":"created","comment":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments/38498217","id":38498217,"diff_hunk":"@@ -0,0 +1,57 @@\n+## SA1127\n+\n+<table>\n+<tr>\n+  <td>TypeName</td>\n+  <td>SA1127GenericTypeConstraintsMustBeOnOwnLine</td>\n+</tr>\n+<tr>\n+  <td>CheckId</td>\n+  <td>SA1127</td>\n+</tr>\n+<tr>\n+  <td>Category</td>\n+  <td>Readability Rules</td>\n+</tr>\n+</table>\n+\n+## Cause\n+\n+A generic constraint on a type or method declaration is on the same line as the declaration, within a C# code file.\n+\n+## Rule description\n+\n+A violation of this rule occurs whenever the code contains one or more `where` clauses containing generic type constraints on the same line as the type or method declaration itself.\n+\n+For example, the following code would produce two violations of this rule:\n+\n+```csharp\n+private void Method<T, R>() where T : class where R : class, new()\n+{\n+}\n+```\n+\n+The following code would not produce any violations:\n+\n+```csharp\n+private void Method<T, R>()\n+    where T : class\n+\twhere R : class, new()\n+{\n+}\n+```\n+\n+## How to fix violations\n+\n+To fix a violation of this rule, move each `where` clause to its own line.\n+\n+## How to suppress violations\n+\n+```csharp\n+#pragma warning disable SA1127 // Generic type constraints must be on their own line\n+private void Method<T>() where T : class\n+{\n+\t// method body...\n+}\n+#pragma warning restore SA1127 // Generic type constraints must be on their own line","path":"documentation/SA1127.md","position":56,"original_position":56,"commit_id":"9c8e20a3360786925bcab71561c938cfd6f7aa4c","original_commit_id":"9c8e20a3360786925bcab71561c938cfd6f7aa4c","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},"body":":bulb: This restore line can be moved up above the `{`.","created_at":"2015-09-02T04:34:27Z","updated_at":"2015-09-02T04:34:27Z","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334#discussion_r38498217","pull_request_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334","_links":{"self":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments/38498217"},"html":{"href":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334#discussion_r38498217"},"pull_request":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334"}}},"pull_request":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334","id":43722050,"html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334","diff_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334.diff","patch_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334.patch","issue_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1334","number":1334,"state":"open","locked":false,"title":"SA1127GenericTypeConstraintsMustBeOnOwnLine","user":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars.githubusercontent.com/u/7525482?v=3","gravatar_id":"","url":"https://api.github.com/users/nbarbettini","html_url":"https://github.com/nbarbettini","followers_url":"https://api.github.com/users/nbarbettini/followers","following_url":"https://api.github.com/users/nbarbettini/following{/other_user}","gists_url":"https://api.github.com/users/nbarbettini/gists{/gist_id}","starred_url":"https://api.github.com/users/nbarbettini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbarbettini/subscriptions","organizations_url":"https://api.github.com/users/nbarbettini/orgs","repos_url":"https://api.github.com/users/nbarbettini/repos","events_url":"https://api.github.com/users/nbarbettini/events{/privacy}","received_events_url":"https://api.github.com/users/nbarbettini/received_events","type":"User","site_admin":false},"body":"Fixes #1176 \r\n\r\nDidn't realize I was supposed to open up a separate issue for discussing the code fix. Oops, will do in the future.\r\n\r\nThe diagnostic part was pretty easy. Any feedback is helpful re: how I went about the code fix. If I'm doing something really weird or non-idiomatic to Roslyn analyzers, I can go back and fix it.\r\n\r\nI tried to cover as many scenarios as I could think of in the tests; hopefully it shows that the code fix is relatively stable.","created_at":"2015-08-30T22:35:39Z","updated_at":"2015-09-02T04:34:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b7b5aef5d43b67eb9bd077b36cbb57b5b20135c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334/commits","review_comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334/comments","review_comment_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1334/comments","statuses_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/statuses/9c8e20a3360786925bcab71561c938cfd6f7aa4c","head":{"label":"nbarbettini:master","ref":"master","sha":"9c8e20a3360786925bcab71561c938cfd6f7aa4c","user":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars.githubusercontent.com/u/7525482?v=3","gravatar_id":"","url":"https://api.github.com/users/nbarbettini","html_url":"https://github.com/nbarbettini","followers_url":"https://api.github.com/users/nbarbettini/followers","following_url":"https://api.github.com/users/nbarbettini/following{/other_user}","gists_url":"https://api.github.com/users/nbarbettini/gists{/gist_id}","starred_url":"https://api.github.com/users/nbarbettini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbarbettini/subscriptions","organizations_url":"https://api.github.com/users/nbarbettini/orgs","repos_url":"https://api.github.com/users/nbarbettini/repos","events_url":"https://api.github.com/users/nbarbettini/events{/privacy}","received_events_url":"https://api.github.com/users/nbarbettini/received_events","type":"User","site_admin":false},"repo":{"id":41265962,"name":"StyleCopAnalyzers","full_name":"nbarbettini/StyleCopAnalyzers","owner":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars.githubusercontent.com/u/7525482?v=3","gravatar_id":"","url":"https://api.github.com/users/nbarbettini","html_url":"https://github.com/nbarbettini","followers_url":"https://api.github.com/users/nbarbettini/followers","following_url":"https://api.github.com/users/nbarbettini/following{/other_user}","gists_url":"https://api.github.com/users/nbarbettini/gists{/gist_id}","starred_url":"https://api.github.com/users/nbarbettini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbarbettini/subscriptions","organizations_url":"https://api.github.com/users/nbarbettini/orgs","repos_url":"https://api.github.com/users/nbarbettini/repos","events_url":"https://api.github.com/users/nbarbettini/events{/privacy}","received_events_url":"https://api.github.com/users/nbarbettini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nbarbettini/StyleCopAnalyzers","description":"An implementation of StyleCop rules using the .NET Compiler Platform","fork":true,"url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers","forks_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/forks","keys_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/teams","hooks_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/hooks","issue_events_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/issues/events{/number}","events_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/events","assignees_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/assignees{/user}","branches_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/branches{/branch}","tags_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/tags","blobs_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/git/refs{/sha}","trees_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/statuses/{sha}","languages_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/languages","stargazers_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/stargazers","contributors_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/contributors","subscribers_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/subscribers","subscription_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/subscription","commits_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/commits{/sha}","git_commits_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/git/commits{/sha}","comments_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/comments{/number}","issue_comment_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/issues/comments{/number}","contents_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/contents/{+path}","compare_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/merges","archive_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/downloads","issues_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/issues{/number}","pulls_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/pulls{/number}","milestones_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/milestones{/number}","notifications_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/labels{/name}","releases_url":"https://api.github.com/repos/nbarbettini/StyleCopAnalyzers/releases{/id}","created_at":"2015-08-23T20:28:40Z","updated_at":"2015-08-23T20:28:43Z","pushed_at":"2015-08-31T02:07:42Z","git_url":"git://github.com/nbarbettini/StyleCopAnalyzers.git","ssh_url":"git@github.com:nbarbettini/StyleCopAnalyzers.git","clone_url":"https://github.com/nbarbettini/StyleCopAnalyzers.git","svn_url":"https://github.com/nbarbettini/StyleCopAnalyzers","homepage":null,"size":5697,"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":"DotNetAnalyzers:master","ref":"master","sha":"dc89abe08231b81969ae18d3ea83c8c7fda93ddb","user":{"login":"DotNetAnalyzers","id":9735576,"avatar_url":"https://avatars.githubusercontent.com/u/9735576?v=3","gravatar_id":"","url":"https://api.github.com/users/DotNetAnalyzers","html_url":"https://github.com/DotNetAnalyzers","followers_url":"https://api.github.com/users/DotNetAnalyzers/followers","following_url":"https://api.github.com/users/DotNetAnalyzers/following{/other_user}","gists_url":"https://api.github.com/users/DotNetAnalyzers/gists{/gist_id}","starred_url":"https://api.github.com/users/DotNetAnalyzers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DotNetAnalyzers/subscriptions","organizations_url":"https://api.github.com/users/DotNetAnalyzers/orgs","repos_url":"https://api.github.com/users/DotNetAnalyzers/repos","events_url":"https://api.github.com/users/DotNetAnalyzers/events{/privacy}","received_events_url":"https://api.github.com/users/DotNetAnalyzers/received_events","type":"Organization","site_admin":false},"repo":{"id":26768275,"name":"StyleCopAnalyzers","full_name":"DotNetAnalyzers/StyleCopAnalyzers","owner":{"login":"DotNetAnalyzers","id":9735576,"avatar_url":"https://avatars.githubusercontent.com/u/9735576?v=3","gravatar_id":"","url":"https://api.github.com/users/DotNetAnalyzers","html_url":"https://github.com/DotNetAnalyzers","followers_url":"https://api.github.com/users/DotNetAnalyzers/followers","following_url":"https://api.github.com/users/DotNetAnalyzers/following{/other_user}","gists_url":"https://api.github.com/users/DotNetAnalyzers/gists{/gist_id}","starred_url":"https://api.github.com/users/DotNetAnalyzers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DotNetAnalyzers/subscriptions","organizations_url":"https://api.github.com/users/DotNetAnalyzers/orgs","repos_url":"https://api.github.com/users/DotNetAnalyzers/repos","events_url":"https://api.github.com/users/DotNetAnalyzers/events{/privacy}","received_events_url":"https://api.github.com/users/DotNetAnalyzers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers","description":"An implementation of StyleCop rules using the .NET Compiler Platform","fork":false,"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers","forks_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/forks","keys_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/teams","hooks_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/hooks","issue_events_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/events{/number}","events_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/events","assignees_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/assignees{/user}","branches_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/branches{/branch}","tags_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/tags","blobs_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/git/refs{/sha}","trees_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/statuses/{sha}","languages_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/languages","stargazers_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/stargazers","contributors_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/contributors","subscribers_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/subscribers","subscription_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/subscription","commits_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/commits{/sha}","git_commits_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/git/commits{/sha}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/comments{/number}","issue_comment_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/comments{/number}","contents_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/contents/{+path}","compare_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/merges","archive_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/downloads","issues_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues{/number}","pulls_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls{/number}","milestones_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/milestones{/number}","notifications_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/labels{/name}","releases_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/releases{/id}","created_at":"2014-11-17T17:29:54Z","updated_at":"2015-09-02T03:33:19Z","pushed_at":"2015-09-02T03:15:41Z","git_url":"git://github.com/DotNetAnalyzers/StyleCopAnalyzers.git","ssh_url":"git@github.com:DotNetAnalyzers/StyleCopAnalyzers.git","clone_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers.git","svn_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers","homepage":null,"size":12685,"stargazers_count":180,"watchers_count":180,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":157,"forks":47,"open_issues":157,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334"},"html":{"href":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1334"},"issue":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1334"},"comments":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1334/comments"},"review_comments":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334/comments"},"review_comment":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1334/commits"},"statuses":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/statuses/9c8e20a3360786925bcab71561c938cfd6f7aa4c"}}}}