{"action":"created","issue":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/2372","repository_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers","labels_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/2372/labels{/name}","comments_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/2372/comments","events_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/2372/events","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2372","id":232752848,"number":2372,"title":"SA1119 incorrectly reporting on pattern matching (is expression)","user":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars3.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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-01T03:02:02Z","updated_at":"2017-06-01T03:03:02Z","closed_at":null,"body":"Given this code:\r\n\r\n```csharp\r\nobject obj = null;\r\n\r\nif (!(obj is string foo))\r\n{\r\n    // do something with foo\r\n}\r\n```\r\n\r\nSA1119 reports the parenthesis as unnecessary (they are necessary). The code fix removes the parenthesis, resulting in syntax that won't compile:\r\n\r\n```csharp\r\nif (! obj is string foo)\r\n{\r\n    // do something with foo\r\n}\r\n```\r\n\r\nIt would appear SA1119 is reaching for the proposed [is not](https://github.com/dotnet/csharplang/issues/246) or [aint](https://github.com/dotnet/csharplang/issues/27#issuecomment-279592692) operator. 😉 "},"comment":{"url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/comments/305376271","html_url":"https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2372#issuecomment-305376271","issue_url":"https://api.github.com/repos/DotNetAnalyzers/StyleCopAnalyzers/issues/2372","id":305376271,"user":{"login":"nbarbettini","id":7525482,"avatar_url":"https://avatars3.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},"created_at":"2017-06-01T03:03:02Z","updated_at":"2017-06-01T03:03:02Z","body":"This should be part of https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/2268 since it's caused by a new C# 7 feature (is-expression pattern matching)."}}
{"actor":{"display_login":"nbarbettini"}}