{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/comments/37630312","id":37630312,"diff_hunk":"@@ -0,0 +1,72 @@\n+﻿/*\n+ * SonarLint for Visual Studio\n+ * Copyright (C) 2015 SonarSource\n+ * sonarqube@googlegroups.com\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 3 of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this program; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02\n+ */\n+\n+using System.Collections.Immutable;\n+using Microsoft.CodeAnalysis;\n+using Microsoft.CodeAnalysis.CodeFixes;\n+using System.Threading.Tasks;\n+using System.Linq;\n+using Microsoft.CodeAnalysis.CodeActions;\n+using Microsoft.CodeAnalysis.CSharp.Syntax;\n+using Microsoft.CodeAnalysis.Formatting;\n+using Microsoft.CodeAnalysis.CSharp;\n+\n+namespace SonarLint.Rules\n+{\n+    [ExportCodeFixProvider(LanguageNames.CSharp)]\n+    public class GenericReadonlyFieldPropertyAssignmentCodeFixProvider : CodeFixProvider\n+    {\n+        internal const string TitleRemove = \"Remove assignment\";\n+        internal const string TitleAddClassConstraint = \"Add reference type constraint\";","path":"src/SonarLint/Rules/GenericReadonlyFieldPropertyAssignmentCodeFixProvider.cs","position":37,"original_position":37,"commit_id":"88a63823fa6a4a737452dd6032452100a0c34c8c","original_commit_id":"88a63823fa6a4a737452dd6032452100a0c34c8c","user":{"login":"dbolkensteyn","id":1132601,"avatar_url":"https://avatars.githubusercontent.com/u/1132601?v=3","gravatar_id":"","url":"https://api.github.com/users/dbolkensteyn","html_url":"https://github.com/dbolkensteyn","followers_url":"https://api.github.com/users/dbolkensteyn/followers","following_url":"https://api.github.com/users/dbolkensteyn/following{/other_user}","gists_url":"https://api.github.com/users/dbolkensteyn/gists{/gist_id}","starred_url":"https://api.github.com/users/dbolkensteyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbolkensteyn/subscriptions","organizations_url":"https://api.github.com/users/dbolkensteyn/orgs","repos_url":"https://api.github.com/users/dbolkensteyn/repos","events_url":"https://api.github.com/users/dbolkensteyn/events{/privacy}","received_events_url":"https://api.github.com/users/dbolkensteyn/received_events","type":"User","site_admin":false},"body":"@tvsonar this seems like the better one - but why isn't it being offered?","created_at":"2015-08-21T12:45:15Z","updated_at":"2015-08-21T12:45:15Z","html_url":"https://github.com/SonarSource/sonarlint-vs/pull/215#discussion_r37630312","pull_request_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/comments/37630312"},"html":{"href":"https://github.com/SonarSource/sonarlint-vs/pull/215#discussion_r37630312"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215","id":42803649,"html_url":"https://github.com/SonarSource/sonarlint-vs/pull/215","diff_url":"https://github.com/SonarSource/sonarlint-vs/pull/215.diff","patch_url":"https://github.com/SonarSource/sonarlint-vs/pull/215.patch","issue_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/215","number":215,"state":"open","locked":false,"title":"Issue #153 Add codefix for S2934 (property assignment of a generic readonly field)","user":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"body":"Fixes #153 ","created_at":"2015-08-19T11:29:56Z","updated_at":"2015-08-21T12:45:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26d424ef39380e36e9d10458a443e0af20883cd5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/215/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/statuses/88a63823fa6a4a737452dd6032452100a0c34c8c","head":{"label":"tvsonar:prop-assign-readonly","ref":"prop-assign-readonly","sha":"88a63823fa6a4a737452dd6032452100a0c34c8c","user":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"repo":{"id":35810200,"name":"sonarlint-vs","full_name":"tvsonar/sonarlint-vs","owner":{"login":"tvsonar","id":11485373,"avatar_url":"https://avatars.githubusercontent.com/u/11485373?v=3","gravatar_id":"","url":"https://api.github.com/users/tvsonar","html_url":"https://github.com/tvsonar","followers_url":"https://api.github.com/users/tvsonar/followers","following_url":"https://api.github.com/users/tvsonar/following{/other_user}","gists_url":"https://api.github.com/users/tvsonar/gists{/gist_id}","starred_url":"https://api.github.com/users/tvsonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvsonar/subscriptions","organizations_url":"https://api.github.com/users/tvsonar/orgs","repos_url":"https://api.github.com/users/tvsonar/repos","events_url":"https://api.github.com/users/tvsonar/events{/privacy}","received_events_url":"https://api.github.com/users/tvsonar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tvsonar/sonarlint-vs","description":"","fork":true,"url":"https://api.github.com/repos/tvsonar/sonarlint-vs","forks_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/forks","keys_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/teams","hooks_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/hooks","issue_events_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/issues/events{/number}","events_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/events","assignees_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/assignees{/user}","branches_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/branches{/branch}","tags_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/tags","blobs_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/git/refs{/sha}","trees_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/statuses/{sha}","languages_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/languages","stargazers_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/stargazers","contributors_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/contributors","subscribers_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/subscribers","subscription_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/subscription","commits_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/commits{/sha}","git_commits_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/git/commits{/sha}","comments_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/comments{/number}","issue_comment_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/issues/comments{/number}","contents_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/contents/{+path}","compare_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/merges","archive_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/downloads","issues_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/issues{/number}","pulls_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/pulls{/number}","milestones_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/milestones{/number}","notifications_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/labels{/name}","releases_url":"https://api.github.com/repos/tvsonar/sonarlint-vs/releases{/id}","created_at":"2015-05-18T09:55:28Z","updated_at":"2015-07-15T06:19:31Z","pushed_at":"2015-08-21T12:30:21Z","git_url":"git://github.com/tvsonar/sonarlint-vs.git","ssh_url":"git@github.com:tvsonar/sonarlint-vs.git","clone_url":"https://github.com/tvsonar/sonarlint-vs.git","svn_url":"https://github.com/tvsonar/sonarlint-vs","homepage":null,"size":62147,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"656fd5c165c11caea5801f014023ef6fb6efa9bd","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":33920958,"name":"sonarlint-vs","full_name":"SonarSource/sonarlint-vs","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars.githubusercontent.com/u/545988?v=3","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonarlint-vs","description":"","fork":false,"url":"https://api.github.com/repos/SonarSource/sonarlint-vs","forks_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/forks","keys_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/events","assignees_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/merges","archive_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonarlint-vs/releases{/id}","created_at":"2015-04-14T08:51:34Z","updated_at":"2015-08-20T16:17:38Z","pushed_at":"2015-08-21T12:30:21Z","git_url":"git://github.com/SonarSource/sonarlint-vs.git","ssh_url":"git@github.com:SonarSource/sonarlint-vs.git","clone_url":"https://github.com/SonarSource/sonarlint-vs.git","svn_url":"https://github.com/SonarSource/sonarlint-vs","homepage":"http://vs.sonarlint.org/","size":63337,"stargazers_count":23,"watchers_count":23,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":66,"forks":11,"open_issues":66,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215"},"html":{"href":"https://github.com/SonarSource/sonarlint-vs/pull/215"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/215"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/issues/215/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/pulls/215/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonarlint-vs/statuses/88a63823fa6a4a737452dd6032452100a0c34c8c"}}}}