{"action":"opened","issue":{"url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool/issues/16","repository_url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool","labels_url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool/issues/16/comments","events_url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool/issues/16/events","html_url":"https://github.com/aarondandy/csharp-analysis-tool/issues/16","id":174828946,"number":16,"title":"integers pretending to be bool","user":{"login":"aarondandy","id":404933,"avatar_url":"https://avatars.githubusercontent.com/u/404933?v=3","gravatar_id":"","url":"https://api.github.com/users/aarondandy","html_url":"https://github.com/aarondandy","followers_url":"https://api.github.com/users/aarondandy/followers","following_url":"https://api.github.com/users/aarondandy/following{/other_user}","gists_url":"https://api.github.com/users/aarondandy/gists{/gist_id}","starred_url":"https://api.github.com/users/aarondandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarondandy/subscriptions","organizations_url":"https://api.github.com/users/aarondandy/orgs","repos_url":"https://api.github.com/users/aarondandy/repos","events_url":"https://api.github.com/users/aarondandy/events{/privacy}","received_events_url":"https://api.github.com/users/aarondandy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aarondandy/csharp-analysis-tool/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T19:11:27Z","updated_at":"2016-09-02T19:11:27Z","closed_at":null,"body":"```\r\nvar found = 0;\r\nforeach(var thing in things){\r\n  if(thing == anotherThing){\r\n    found |= 1;\r\n  }\r\n}\r\n\r\nif(found != 0){\r\n  // ...\r\n}\r\n```\r\n\r\nbecause `found` is only ever assigned to or compared to 1 or 0 it should be converted to a boolean and all other references to it should assign true or false. This could include thing such as `found |= true`, `found = false`, `found == 0`, `found == 1`, and many more. Also be careful to verify that the variable is not used in any other way, for example passed to other methods that require the integral type."}}
{"actor":{"display_login":"aarondandy"}}