{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/16","labels_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/16/comments","events_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/16/events","html_url":"https://github.com/dotnet/roslyn-analyzers/issues/16","id":88475746,"number":16,"title":"Remove uses of ToString()","user":{"login":"tmeschter","id":10506730,"avatar_url":"https://avatars.githubusercontent.com/u/10506730?v=3","gravatar_id":"","url":"https://api.github.com/users/tmeschter","html_url":"https://github.com/tmeschter","followers_url":"https://api.github.com/users/tmeschter/followers","following_url":"https://api.github.com/users/tmeschter/following{/other_user}","gists_url":"https://api.github.com/users/tmeschter/gists{/gist_id}","starred_url":"https://api.github.com/users/tmeschter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmeschter/subscriptions","organizations_url":"https://api.github.com/users/tmeschter/orgs","repos_url":"https://api.github.com/users/tmeschter/repos","events_url":"https://api.github.com/users/tmeschter/events{/privacy}","received_events_url":"https://api.github.com/users/tmeschter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/labels/Area-MetaCompilation","name":"Area-MetaCompilation","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"zoepetard","id":12632992,"avatar_url":"https://avatars.githubusercontent.com/u/12632992?v=3","gravatar_id":"","url":"https://api.github.com/users/zoepetard","html_url":"https://github.com/zoepetard","followers_url":"https://api.github.com/users/zoepetard/followers","following_url":"https://api.github.com/users/zoepetard/following{/other_user}","gists_url":"https://api.github.com/users/zoepetard/gists{/gist_id}","starred_url":"https://api.github.com/users/zoepetard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoepetard/subscriptions","organizations_url":"https://api.github.com/users/zoepetard/orgs","repos_url":"https://api.github.com/users/zoepetard/repos","events_url":"https://api.github.com/users/zoepetard/events{/privacy}","received_events_url":"https://api.github.com/users/zoepetard/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-06-15T16:31:17Z","updated_at":"2015-07-29T22:47:38Z","closed_at":null,"body":"I see a fair number of places where `ToString()` is being called to get a string representation of an object which is then compared to some known/expected value.\r\n\r\nThe contract of the `object.ToString` method is very loose: it must simply return *some* string representation of the object. That string representation may not be what you want or expect, and in many cases it isn't documented at all. For example, calling `ToString()` on a `SyntaxNode` may return a string that preserves the original formatting in the document, or it may not.\r\n\r\nFor that reason you should generally only use `ToString` for debugging or logging purposes, and all other uses should be replaced with something else."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/comments/126119111","html_url":"https://github.com/dotnet/roslyn-analyzers/issues/16#issuecomment-126119111","issue_url":"https://api.github.com/repos/dotnet/roslyn-analyzers/issues/16","id":126119111,"user":{"login":"zoepetard","id":12632992,"avatar_url":"https://avatars.githubusercontent.com/u/12632992?v=3","gravatar_id":"","url":"https://api.github.com/users/zoepetard","html_url":"https://github.com/zoepetard","followers_url":"https://api.github.com/users/zoepetard/followers","following_url":"https://api.github.com/users/zoepetard/following{/other_user}","gists_url":"https://api.github.com/users/zoepetard/gists{/gist_id}","starred_url":"https://api.github.com/users/zoepetard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoepetard/subscriptions","organizations_url":"https://api.github.com/users/zoepetard/orgs","repos_url":"https://api.github.com/users/zoepetard/repos","events_url":"https://api.github.com/users/zoepetard/events{/privacy}","received_events_url":"https://api.github.com/users/zoepetard/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T22:47:38Z","updated_at":"2015-07-29T22:47:38Z","body":"Summary:\r\n**DiagnosticAnalyzer.cs**: all instances of ToString() removed except:\r\n- 2 instances on line 2191\r\n\r\n```\r\n if (returnSymbol.Type.ToString() != \"System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.DiagnosticDescriptor>\" && returnSymbol.Type.Kind.ToString() != \"ErrorType\")\r\n```\r\n\r\n**CodeFixProvider.cs**:  all instances of ToString() removed"}}