{"action":"created","comment":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments/42326059","id":42326059,"diff_hunk":"@@ -0,0 +1,49 @@\n+﻿// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.\n+// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.\n+\n+namespace StyleCop.Analyzers.ReadabilityRules\n+{\n+    using System.Collections.Immutable;\n+    using Microsoft.CodeAnalysis;\n+    using Microsoft.CodeAnalysis.CSharp;\n+    using Microsoft.CodeAnalysis.Diagnostics;\n+\n+    [DiagnosticAnalyzer(LanguageNames.CSharp)]\n+    internal class SX1101DoNotPrefixLocalMembersWithThis : DiagnosticAnalyzer\n+    {\n+        /// <summary>\n+        /// The ID for diagnostics produced by the <see cref=\"SX1101DoNotPrefixLocalMembersWithThis\"/> analyzer.\n+        /// </summary>\n+        public const string DiagnosticId = \"SX1101\";\n+        private static readonly LocalizableString Title = new LocalizableResourceString(nameof(ReadabilityResources.SX1101Title), ReadabilityResources.ResourceManager, typeof(ReadabilityResources));\n+        private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(ReadabilityResources.SX1101MessageFormat), ReadabilityResources.ResourceManager, typeof(ReadabilityResources));\n+        private static readonly LocalizableString Description = new LocalizableResourceString(nameof(ReadabilityResources.SX1101Description), ReadabilityResources.ResourceManager, typeof(ReadabilityResources));\n+        private static readonly string HelpLink = \"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SX1101.md\";\n+\n+        private static readonly DiagnosticDescriptor Descriptor =\n+            new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.ReadabilityRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledAlternative, Description, HelpLink);\n+\n+        /// <inheritdoc/>\n+        public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =\n+            ImmutableArray.Create(Descriptor);\n+\n+        /// <inheritdoc/>\n+        public override void Initialize(AnalysisContext context)\n+        {\n+            context.RegisterCompilationStartAction(HandleCompilationStart);\n+        }\n+\n+        private static void HandleCompilationStart(CompilationStartAnalysisContext context)\n+        {\n+            context.RegisterSyntaxNodeActionHonorExclusions(HandleThisExpression, SyntaxKind.ThisExpression);\n+        }\n+\n+        private static void HandleThisExpression(SyntaxNodeAnalysisContext context)\n+        {\n+            if (context.Node.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression))\n+            {\n+                context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation()));","path":"StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SX1101DoNotPrefixLocalMembersWithThis.cs","position":45,"original_position":45,"commit_id":"fbebc6f80d9858865c08a869b61af9a5a79f3848","original_commit_id":"fbebc6f80d9858865c08a869b61af9a5a79f3848","user":{"login":"pdelvo","id":1710209,"avatar_url":"https://avatars.githubusercontent.com/u/1710209?v=3","gravatar_id":"","url":"https://api.github.com/users/pdelvo","html_url":"https://github.com/pdelvo","followers_url":"https://api.github.com/users/pdelvo/followers","following_url":"https://api.github.com/users/pdelvo/following{/other_user}","gists_url":"https://api.github.com/users/pdelvo/gists{/gist_id}","starred_url":"https://api.github.com/users/pdelvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdelvo/subscriptions","organizations_url":"https://api.github.com/users/pdelvo/orgs","repos_url":"https://api.github.com/users/pdelvo/repos","events_url":"https://api.github.com/users/pdelvo/events{/privacy}","received_events_url":"https://api.github.com/users/pdelvo/received_events","type":"User","site_admin":false},"body":"What if this is necessary because e.g. the name of a field is the same as the name of a parameter?","created_at":"2015-10-18T20:42:24Z","updated_at":"2015-10-18T20:42:24Z","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649#discussion_r42326059","pull_request_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649","_links":{"self":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments/42326059"},"html":{"href":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649#discussion_r42326059"},"pull_request":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649"}}},"pull_request":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649","id":48016123,"html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649","diff_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649.diff","patch_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649.patch","issue_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1649","number":1649,"state":"open","locked":false,"title":"Implemented SX1101 (incl. tests, codefix, and docs)","user":{"login":"vweijsters","id":10659991,"avatar_url":"https://avatars.githubusercontent.com/u/10659991?v=3","gravatar_id":"","url":"https://api.github.com/users/vweijsters","html_url":"https://github.com/vweijsters","followers_url":"https://api.github.com/users/vweijsters/followers","following_url":"https://api.github.com/users/vweijsters/following{/other_user}","gists_url":"https://api.github.com/users/vweijsters/gists{/gist_id}","starred_url":"https://api.github.com/users/vweijsters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweijsters/subscriptions","organizations_url":"https://api.github.com/users/vweijsters/orgs","repos_url":"https://api.github.com/users/vweijsters/repos","events_url":"https://api.github.com/users/vweijsters/events{/privacy}","received_events_url":"https://api.github.com/users/vweijsters/received_events","type":"User","site_admin":false},"body":"Fixes #1601","created_at":"2015-10-18T19:52:56Z","updated_at":"2015-10-18T20:42:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"650d2d92fa05d4605d44a9f9682867d65704f3b2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649/commits","review_comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649/comments","review_comment_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1649/comments","statuses_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/statuses/fbebc6f80d9858865c08a869b61af9a5a79f3848","head":{"label":"vweijsters:SX1101","ref":"SX1101","sha":"fbebc6f80d9858865c08a869b61af9a5a79f3848","user":{"login":"vweijsters","id":10659991,"avatar_url":"https://avatars.githubusercontent.com/u/10659991?v=3","gravatar_id":"","url":"https://api.github.com/users/vweijsters","html_url":"https://github.com/vweijsters","followers_url":"https://api.github.com/users/vweijsters/followers","following_url":"https://api.github.com/users/vweijsters/following{/other_user}","gists_url":"https://api.github.com/users/vweijsters/gists{/gist_id}","starred_url":"https://api.github.com/users/vweijsters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweijsters/subscriptions","organizations_url":"https://api.github.com/users/vweijsters/orgs","repos_url":"https://api.github.com/users/vweijsters/repos","events_url":"https://api.github.com/users/vweijsters/events{/privacy}","received_events_url":"https://api.github.com/users/vweijsters/received_events","type":"User","site_admin":false},"repo":{"id":30612791,"name":"StyleCopAnalyzers","full_name":"vweijsters/StyleCopAnalyzers","owner":{"login":"vweijsters","id":10659991,"avatar_url":"https://avatars.githubusercontent.com/u/10659991?v=3","gravatar_id":"","url":"https://api.github.com/users/vweijsters","html_url":"https://github.com/vweijsters","followers_url":"https://api.github.com/users/vweijsters/followers","following_url":"https://api.github.com/users/vweijsters/following{/other_user}","gists_url":"https://api.github.com/users/vweijsters/gists{/gist_id}","starred_url":"https://api.github.com/users/vweijsters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweijsters/subscriptions","organizations_url":"https://api.github.com/users/vweijsters/orgs","repos_url":"https://api.github.com/users/vweijsters/repos","events_url":"https://api.github.com/users/vweijsters/events{/privacy}","received_events_url":"https://api.github.com/users/vweijsters/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vweijsters/StyleCopAnalyzers","description":"An implementation of StyleCop rules using the .NET Compiler Platform","fork":true,"url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers","forks_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/forks","keys_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/teams","hooks_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/hooks","issue_events_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/issues/events{/number}","events_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/events","assignees_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/assignees{/user}","branches_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/branches{/branch}","tags_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/tags","blobs_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/git/refs{/sha}","trees_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/statuses/{sha}","languages_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/languages","stargazers_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/stargazers","contributors_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/contributors","subscribers_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/subscribers","subscription_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/subscription","commits_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/commits{/sha}","git_commits_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/git/commits{/sha}","comments_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/comments{/number}","issue_comment_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/issues/comments{/number}","contents_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/contents/{+path}","compare_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/merges","archive_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/downloads","issues_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/issues{/number}","pulls_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/pulls{/number}","milestones_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/milestones{/number}","notifications_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/labels{/name}","releases_url":"https://api.github.com/repos/vweijsters/StyleCopAnalyzers/releases{/id}","created_at":"2015-02-10T20:23:05Z","updated_at":"2015-05-07T19:23:09Z","pushed_at":"2015-10-18T19:49:30Z","git_url":"git://github.com/vweijsters/StyleCopAnalyzers.git","ssh_url":"git@github.com:vweijsters/StyleCopAnalyzers.git","clone_url":"https://github.com/vweijsters/StyleCopAnalyzers.git","svn_url":"https://github.com/vweijsters/StyleCopAnalyzers","homepage":null,"size":7582,"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":"DotNetAnalyzers:master","ref":"master","sha":"2559298e572fd3c41c37efad17b67afbb24bae71","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-10-18T08:37:03Z","pushed_at":"2015-10-18T19:52:56Z","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":14299,"stargazers_count":236,"watchers_count":236,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":155,"forks":54,"open_issues":155,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649"},"html":{"href":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/1649"},"issue":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1649"},"comments":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/1649/comments"},"review_comments":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649/comments"},"review_comment":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/pulls/1649/commits"},"statuses":{"href":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/statuses/fbebc6f80d9858865c08a869b61af9a5a79f3848"}}}}