{"action":"created","issue":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/4027","repository_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck","labels_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/4027/labels{/name}","comments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/4027/comments","events_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/4027/events","html_url":"https://github.com/rubberduck-vba/Rubberduck/issues/4027","id":325391369,"number":4027,"title":"Inspection for using enums as a bitmask","user":{"login":"IvenBach","id":26076874,"avatar_url":"https://avatars1.githubusercontent.com/u/26076874?v=4","gravatar_id":"","url":"https://api.github.com/users/IvenBach","html_url":"https://github.com/IvenBach","followers_url":"https://api.github.com/users/IvenBach/followers","following_url":"https://api.github.com/users/IvenBach/following{/other_user}","gists_url":"https://api.github.com/users/IvenBach/gists{/gist_id}","starred_url":"https://api.github.com/users/IvenBach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvenBach/subscriptions","organizations_url":"https://api.github.com/users/IvenBach/orgs","repos_url":"https://api.github.com/users/IvenBach/repos","events_url":"https://api.github.com/users/IvenBach/events{/privacy}","received_events_url":"https://api.github.com/users/IvenBach/received_events","type":"User","site_admin":false},"labels":[{"id":540647642,"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/labels/difficulty-02-ducky","name":"difficulty-02-ducky","color":"9ECFA4","default":false},{"id":175492135,"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/labels/feature-inspections","name":"feature-inspections","color":"DDDDDD","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-22T17:25:35Z","updated_at":"2018-05-23T19:40:36Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I kneejerk use `MsgBox \"This will show the third button selected\", vbYesNoCancel + vbDefaultButton3 + vbInformation` without thinking about it. Was corrected to use `MsgBox \"This will show the third button selected\", vbYesNoCancel Or vbDefaultButton3 Or vbInformation`.\r\n\r\nLet's bring this to other users attention."},"comment":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/comments/391471761","html_url":"https://github.com/rubberduck-vba/Rubberduck/issues/4027#issuecomment-391471761","issue_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/4027","id":391471761,"user":{"login":"retailcoder","id":5751684,"avatar_url":"https://avatars2.githubusercontent.com/u/5751684?v=4","gravatar_id":"","url":"https://api.github.com/users/retailcoder","html_url":"https://github.com/retailcoder","followers_url":"https://api.github.com/users/retailcoder/followers","following_url":"https://api.github.com/users/retailcoder/following{/other_user}","gists_url":"https://api.github.com/users/retailcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/retailcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retailcoder/subscriptions","organizations_url":"https://api.github.com/users/retailcoder/orgs","repos_url":"https://api.github.com/users/retailcoder/repos","events_url":"https://api.github.com/users/retailcoder/events{/privacy}","received_events_url":"https://api.github.com/users/retailcoder/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T19:40:36Z","updated_at":"2018-05-23T19:40:36Z","author_association":"MEMBER","body":"@Inarion blame @bclothier for this one :wink:\r\n\r\nI'd propose this wording (under \"Readability & Maintainability\", and \"suggestion\" or \"hint\" level):\r\n\r\n> **Bitwise operation uses arithmetic operator**\r\n> While mathematically equivalent, the arithmetic addition `+` and bitwise `Or` operators don't convey the same *semantics*: in the case of bitwise operations on enum members, using a bitwise operator better conveys the actual operation being executed.\r\n\r\nBetter ideas welcome :smiley: \r\n\r\nThis inspection will fire a false positive for any enum that has a meaningful numerical value in the arithmetic sense (can't think of a legit example of one though); let's allow an `@Ignore` annotation at the enum declaration level (for user code anyway), so that a legit `+` can be ignored once and for all at the declaration site."}}
{"actor":{"display_login":"retailcoder"}}