Repository: VKCOM/noverify
Pull request #763 (2020-09-03 11:57:38)

cmd/embeddedrules: disable mixed args bitwiseOps forms
They give more false positives than expected.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>


Patch:
diff --git a/src/cmd/embeddedrules/rules.go b/src/cmd/embeddedrules/rules.go
index c35d749..7e0baae 100644
--- a/src/cmd/embeddedrules/rules.go
+++ b/src/cmd/embeddedrules/rules.go
@@ -77,7 +77,7 @@ func (fi bindataFileInfo) Sys() interface{} {
 	return nil
 }
 
-var _embeddedrulesRulesPhp = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x98\xdb\x6e\xe3\x36\x13\xc7\xef\xfd\x14\x63\x43\xeb\xd8\x5e\xdb\xfa\x16\xdf\x5d\x8e\xdb\xde\x15\x58\x34\xc0\x16\x7b\x55\x24\x36\x25\x8d\x2c\x6e\x24\x52\x25\xa9\xc4\x6a\x94\x77\x2f\x48\x49\xb1\xac\x83\x2d\xa5\x0d\x10\xc3\x1a\x91\xf3\xfb\xcf\x0c\x8f\xbe\xbe\x8b\x83\x78\x34\xb2\x17\x8b\x11\x2c\xe0\x2b\xe3\x94\xc9\x18\x5d\x45\x39\x83\x5f\xbe\x7d\x33\xc6\x90\x32\x85\x02\xf2\x3f\x8f\x4a\xe2\x84\x38\x82\x85\x7d\xe8\xe6\xf2\x28\x42\xa6\xe0\x3b\xc6\x5c\x28\x50\x28\x18\x11\x29\xe0\x3e\x16\x28\x25\xe5\x4c\x82\x0a\x88\x02\x97\x30\x70\x10\x24\x8d\xe2\x90\xfa\x14\xbd\xb5\xe9\xee\xa0\xcf\x05\x02\x58\x7b\xb8\xd3\x1f\x97\x60\xa5\xe6\x05\xf1\x73\xb0\x7e\x51\x18\xed\x91\x9f\xb0\x5c\x5f\x81\xf9\x23\xf7\x96\xce\xe6\xf0\x3a\x02\x30\x9a\x40\xf7\x8e\x48\xea\x20\xb8\x3c\x09\x3d\x10\x18\x87\xc4\x45\x50\x01\xbe\xcb\x7b\xa1\x2a\x80\x9f\x89\x54\x60\xb9\x9c\x79\x45\x2f\x95\xc6\x08\x0e\xe7\x61\xc5\x6a\x8f\x20\x7f\x82\x3b\x50\x22\x41\xb8\x04\x9f\x84\x12\xaf\x46\x27\x80\x2f\x82\x2a\x04\x22\x61\x3b\xd3\xee\xe6\xc6\xc1\xb6\x4a\x81\xf1\x7f\xcb\x29\xd3\x54\x42\x7c\xba\xaf\xa4\xce\x98\xe2\x44\x20\x58\xfb\x03\xad\x92\xf2\x01\x94\xbb\x16\xca\x5d\x49\xd1\x7e\xa9\x94\xa8\x66\xd6\x7e\x5e\x75\xff\xd6\x39\x62\x62\xae\x90\x29\x4a\x42\xe0\x31\x0a\x62\xca\x1b\x0b\x74\xd1\x43\xe6\xa2\xf6\x96\xa0\x6c\x0c\x96\x29\x58\x11\x91\x4f\x70\x73\x03\xff\xbb\x02\xdb\xd6\x5f\x02\x22\x21\xa0\xbb\x00\x45\xd5\x81\x0a\x08\x83\xe9\xd1\x98\x9a\x1d\x1c\xcc\x8d\x87\xe3\xc1\x75\xe8\x5c\x8e\x2b\x1b\x7e\xe7\x0a\x2f\xe1\x05\xf5\x68\xd2\xaa\xb7\x15\x0d\xe3\x1b\x9d\x12\x9d\x20\xd2\x50\x0e\xf8\x8c\x2c\x77\x41\x7d\xa0\xef\xf3\xc0\x25\xc9\x2e\x50\xf9\x38\xdc\xea\x11\xe1\x06\xe8\x3e\xdd\xc7\xdb\x62\xb6\xe8\x27\x09\x0e\x57\x41\x9e\x16\x33\x4a\x6c\x1b\x74\x53\x09\x66\x54\x01\x95\xc0\xb8\x02\x02\x3b\xce\xbd\xb2\x19\xf8\x5c\x80\x43\xd5\x0b\x95\x78\xc8\xe8\x7c\x6d\xba\xe7\x3e\xf2\xc4\x53\xb6\x83\x2d\x65\xcf\x24\xa4\x5e\xee\x76\xa9\x67\x2d\xba\x0a\x3d\x60\x49\xe4\xa0\x00\x9f\x27\xcc\x33\x33\x62\x0b\x54\xe6\xbd\x35\xd2\x68\x0c\x30\x8c\xfd\x24\x5c\x82\x83\x2e\x49\x64\x3e\xc1\x04\xe7\x0a\xb8\x6f\xbe\xc7\x82\x3b\x21\x46\x5a\xe7\x21\x2d\xb9\x10\xf8\xad\x0a\x06\x22\x10\x08\x08\x94\x49\x58\xf4\x26\x6a\x5d\x0c\x49\xf8\xfa\x42\x04\xd3\x6a\xcf\x94\x38\x1f\x7d\x84\xa5\x1b\xfc\x6b\xe3\x50\x45\x98\x77\x69\xca\x07\x60\x6d\x74\x67\x6b\xa3\x4b\xb6\xb9\x2a\x4d\xd3\x77\xbb\x36\xbd\xd5\x71\xe3\xbe\x38\xd6\xc6\x1b\x77\xf0\xc6\x9d\xbc\x9b\x01\xf1\xfd\xbf\x2d\xc0\xce\x08\x4f\x84\x38\x20\xc6\x16\xe6\xb8\x8b\x39\xae\x30\x87\x95\x31\xab\x97\x91\x8b\x46\x15\xb3\x2a\x2f\xfb\x37\x55\xcc\x1a\x55\x3c\xc2\x8d\x3b\x70\x1f\x2e\x62\xd6\x28\x62\x2d\xbc\xce\xf8\x3e\x5a\xc3\xac\x59\xc3\x5a\x88\x9d\x31\x1e\x90\xdd\xab\x37\x91\x92\xee\x98\xb6\xf4\xde\xe7\x6f\xf4\xc7\x67\xb3\x2b\xd4\x36\xfa\xcf\x37\x85\xb5\xb2\x18\xe7\x80\xfb\xf8\xcc\x16\x7f\xb4\x47\x19\x3f\xb5\x3d\xca\xd8\xba\x77\xc2\x8a\xa8\xbe\x94\x55\x0b\x65\xd5\x83\xb2\x1a\x44\x59\xb4\x50\x16\x3d\x28\x8b\x41\x14\xbb\x85\x62\xf7\xa0\xd8\x83\x28\x9f\x5a\x28\x9f\x7a\x50\x3e\x0d\xa2\x4c\x5b\x28\xd3\x1e\x94\xe9\x20\x4a\xd6\x42\xc9\x7a\x50\xb2\x41\x94\xc7\x16\xca\x63\x0f\xca\xe3\x20\xca\xf5\x75\x0b\x26\x37\x9e\xe1\x5c\x5f\x0f\x02\xdd\xde\xb6\x80\x72\xe3\x19\xd0\xed\xed\x20\xd0\xba\x85\xb3\xee\x81\x59\x0f\x3c\x0b\xb7\x60\x72\xe3\x19\x8e\x39\x31\xf7\x3c\x15\xfb\xfe\xca\x49\x57\x9c\x21\x44\x54\x2a\xf2\xd4\x38\x0d\x93\x3f\x5d\x9e\x30\x35\xb3\xc8\xfc\xe1\x78\x49\xad\xbc\x59\x7d\x79\x38\x5e\x58\xb9\xef\xff\x9a\x7e\x69\x2c\xab\xe5\xb6\xa2\x0f\x6f\xc4\x09\x53\xd0\x37\x40\xe6\xa1\x07\x8a\x83\x3e\xe5\x19\x8f\xab\x2f\xe6\xb8\xcb\x80\x32\x0f\xf7\x95\x04\x40\x0d\x0b\x2b\xd0\xe0\x32\xfc\xaa\xd4\x5a\x9e\xcf\x82\x25\xfd\x1b\xb9\x7f\x8e\x9c\xb7\x6a\x45\x1f\x5e\x3d\x9c\x4a\xbd\x4c\x64\x4c\x5d\xca\x13\x7d\x2e\xdd\x25\xf9\xde\xc6\x85\x87\xe2\x38\xef\x52\x89\x98\xcb\xd9\x85\x7d\xb1\x04\x4b\xce\x8f\x32\x5f\xbc\xb3\xe4\x12\x2e\xec\x8b\x79\x6d\x4b\x13\x3b\x79\xaf\xfd\x75\x27\xbf\xac\xbe\x49\x83\xcb\x85\x40\x57\x41\x40\x52\xa9\x88\xfb\x04\xfa\x98\xcf\x10\xbd\x10\xeb\x0a\xdf\xc3\xd5\xfb\x7d\xd9\x7e\x93\xb7\x2d\x37\xfd\x52\xdb\xeb\xc4\x0d\x88\x98\xbc\x2d\xc1\x7a\x9d\x2c\x26\x6f\xf3\xab\xf2\x35\x3d\xf3\xfe\x74\xff\xc4\x91\x4a\x6c\x8a\x3a\xbf\x4e\xa4\xaa\xb7\x79\xeb\x28\x7c\x6b\xd0\xc5\xed\xdd\x14\x48\xc7\x2d\x13\xe7\xa7\xb6\x77\x05\x1e\x0b\xdc\x6d\x8a\x4e\x33\x6b\xb3\x04\xf3\xdf\x94\x31\x5c\x42\x8e\x57\x42\x37\x3c\x95\x76\x1d\x7d\xd1\xa5\x92\xf2\x36\x4d\x5d\xf9\x6d\xb4\x9d\x4c\x3e\x9e\x40\x0f\x43\x1a\x51\x3d\x2c\x7b\xe8\xc7\x7d\x1c\x72\xaf\x00\xb7\x08\xec\x35\x6b\x12\x49\x76\xa8\xaf\x71\x8d\x6b\x68\x6d\xe5\xa2\x3e\xcc\x2c\x2a\x7f\x7c\xff\xa6\x37\xdf\x67\x14\xd4\x4f\xe7\xb0\x5e\xaf\x8f\xe6\x52\xb5\x55\xa3\x59\x65\x5a\x15\xb4\xfb\x58\x76\xce\xab\x1f\x12\x3d\x98\xd6\x74\x71\x01\xfc\x19\x45\xfe\xc3\x4f\x71\x8b\x96\x4b\x88\x51\x04\x24\x96\x9a\x49\xe5\xfb\x62\x74\x57\x3b\x57\x4c\x0f\x6b\x7d\xe5\xd7\xa3\x7d\xd3\x94\x56\xf7\x80\x96\xa3\xc6\x91\xc4\x6c\x98\xc4\x2c\x3b\x21\x31\xcb\x3e\x24\xb1\xf3\x9c\x62\x04\x36\xe5\x31\x90\x3c\x42\x15\xe8\x18\xcc\x45\x20\x22\xa9\xf9\xad\xc0\xd1\x57\x7b\x96\x44\x28\xa8\x6b\xae\xfb\x55\xf0\x78\x46\x99\xca\xfc\x90\x13\x35\xaf\x69\x3a\x7e\x95\x56\xa7\xd8\xfb\xf5\xa5\xcc\x64\xf1\x90\x55\x1f\x1e\x8b\x07\x7d\x7b\xf9\x27\x00\x00\xff\xff\x61\x31\xe5\x35\xeb\x14\x00\x00")
+var _embeddedrulesRulesPhp = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x98\xdb\x6e\xe3\x36\x13\x80\xef\xfd\x14\x63\x43\xeb\xd8\x5e\xdb\xfa\x17\xff\x5d\x8e\xdb\xde\x15\x58\x34\xc0\x16\x7b\x55\xec\xda\x94\x34\xb2\xb8\x91\x49\x95\xa4\x12\xab\x51\xde\xbd\x20\x29\xc5\xb2\x0e\xb1\x94\x36\x40\x0c\x7b\x48\xce\x37\x27\x72\x28\x5d\xdf\x25\x51\x32\x1a\xb9\x8b\xc5\x08\x16\xf0\x99\x71\xca\x64\x82\xbe\xa2\x9c\xc1\x2f\x5f\xbe\x18\x61\x4c\x99\x42\x01\xf6\x2f\xa0\x92\x78\x31\x8e\x60\xe1\x1e\x97\xf9\x7c\xbf\x47\xa6\xe0\x2b\x26\x5c\x28\x50\x28\x18\x11\x19\xe0\x21\x11\x28\x25\xe5\x4c\x82\x8a\x88\x02\x9f\x30\xf0\x10\x24\xdd\x27\x31\x0d\x29\x06\x6b\xb3\xdc\xc3\x90\x0b\x04\x70\x0e\x70\xa7\x3f\x2e\xc1\xc9\xcc\x00\x09\x2d\x58\x0f\x14\x42\x77\x14\xa6\xcc\xda\x57\x60\xfe\xb0\xda\xb2\xd9\x1c\x9e\x47\x00\xc6\x26\xd0\xab\xf7\x24\xf3\x10\x7c\x9e\xc6\x01\x08\x4c\x62\xe2\x23\xa8\x08\x5f\xcd\x7b\xa2\x2a\x82\x9f\xa9\x54\xe0\xf8\x9c\x05\xc5\x2a\x95\x25\x08\x1e\xe7\x71\x45\xea\x8e\xc0\xfe\x82\x3b\x50\x22\x45\xb8\x84\x90\xc4\x12\xaf\x46\x6f\x00\x9f\x04\x55\x08\x44\xc2\x76\xa6\xd5\xcd\x8d\x82\x6d\x95\x02\xe3\xff\x96\x53\x86\xa9\x84\x84\xf4\x50\x09\x9d\x11\x25\xa9\x40\x70\x0e\x47\x5a\x25\xe4\x03\x28\x77\x2d\x94\xbb\x92\xa2\xf5\x52\x29\x51\xcd\x9c\xc3\xbc\xaa\xfe\xa5\xb3\x62\x12\xae\x90\x29\x4a\x62\xe0\x09\x0a\x62\xd2\x9b\x08\xf4\x31\x40\xe6\xa3\xd6\x96\xa2\x6c\x14\xcb\x14\x9c\x3d\x91\x0f\x70\x73\x03\xff\xbb\x02\xd7\xd5\x5f\x22\x22\x21\xa2\xbb\x08\x45\x55\x81\x8a\x08\x83\xe9\x49\x4d\xcd\x8e\x0a\xe6\x46\xc3\x69\x71\x1d\x17\x97\x75\xe5\xc2\xef\x5c\xe1\x25\x3c\xa1\xae\x26\x6d\xf5\xb6\x62\xc3\xf8\x46\x87\x44\x07\x88\x34\x2c\x07\x7c\x44\x66\x55\xd0\x10\xe8\xeb\x3e\xf0\x49\xba\x8b\x94\xad\xc3\xad\xae\x08\x3f\x42\xff\xe1\x3e\xd9\x16\xbb\x45\xff\x92\xe0\x71\x15\xd9\xb0\x98\x2a\x71\x5d\xd0\x53\x25\x98\xaa\x02\x2a\x81\x71\x05\x04\x76\x9c\x07\xe5\x34\x08\xb9\x00\x8f\xaa\x27\x2a\xf1\x18\xd1\xf9\xda\x2c\xb7\x3a\x6c\xe0\x29\xdb\xc1\x96\xb2\x47\x12\xd3\xc0\xaa\x5d\xea\x5d\x8b\xbe\xc2\x00\x58\xba\xf7\x50\x40\xc8\x53\x16\x98\x1d\xb1\x05\x2a\xed\x6a\x8d\x34\x36\x46\x18\x27\x61\x1a\x2f\xc1\x43\x9f\xa4\xd2\x6e\x30\xc1\xb9\x02\x1e\x9a\xef\x89\xe0\x5e\x8c\x7b\x6d\xe7\x31\x2c\xd6\x10\xf8\xad\x0a\x06\x22\x10\x08\x08\x94\x69\x5c\xac\x26\x6a\x5d\x94\x24\x7c\x7e\x22\x82\x69\x6b\xcf\xa4\xd8\x56\x1f\x61\xd9\x06\xff\xda\x78\x54\x11\x16\x5c\x9a\xf4\x01\x38\x1b\xbd\xd8\xd9\xe8\x94\x6d\xae\x4a\xd1\xf4\x55\xae\x45\x2f\x75\xdc\xb8\x2f\x8e\xb5\xf1\xc6\x1d\xbc\x71\x27\xef\x66\x80\x7f\xff\x6f\x73\xb0\xd3\xc3\x37\x5c\x1c\xe0\x63\x0b\x73\xdc\xc5\x1c\x57\x98\xc3\xd2\x98\xd7\xd3\xc8\x45\x23\x8b\x79\x95\x97\xff\x9b\x2c\xe6\x8d\x2c\x9e\xe0\xc6\x1d\xb8\x77\x27\x31\x6f\x24\xb1\xe6\x5e\xa7\x7f\xef\xcd\x61\xde\xcc\x61\xcd\xc5\x4e\x1f\x8f\xc8\xee\xd3\x9b\x48\x49\x77\x4c\x4b\x7a\xf7\xf9\x1b\xfd\xf1\xd1\x74\x85\x5a\xa3\xff\x78\x53\x48\x2b\x87\xb1\x05\xdc\x27\x67\x5a\xfc\x49\x8f\x32\x7a\x6a\x3d\xca\xc8\xba\x3b\x61\xc5\xa8\xbe\x94\x55\x0b\x65\xd5\x83\xb2\x1a\x44\x59\xb4\x50\x16\x3d\x28\x8b\x41\x14\xb7\x85\xe2\xf6\xa0\xb8\x83\x28\x1f\x5a\x28\x1f\x7a\x50\x3e\x0c\xa2\x4c\x5b\x28\xd3\x1e\x94\xe9\x20\x4a\xde\x42\xc9\x7b\x50\xf2\x41\x94\x1f\x2d\x94\x1f\x3d\x28\x3f\x06\x51\xae\xaf\x5b\x30\x56\x78\x86\x73\x7d\x3d\x08\x74\x7b\xdb\x02\xb2\xc2\x33\xa0\xdb\xdb\x41\xa0\x75\x0b\x67\xdd\x03\xb3\x1e\x78\x17\x6e\xc1\x58\xe1\x19\x8e\xb9\x31\xf7\xbc\x15\x87\xe1\xca\xcb\x56\x9c\x21\xec\xa9\x54\xe4\xa1\x71\x1b\x26\x7f\xfa\x3c\x65\x6a\xe6\x90\xf9\xf7\xd3\x23\xb5\x32\xb2\xfa\xf4\xfd\xf4\x60\xe5\x61\xf8\x6b\xf6\xa9\x71\xac\x96\x6d\x45\x5f\xde\x88\x17\x67\xa0\x9f\x00\x59\x80\x01\x28\x0e\xfa\x96\x67\x34\xae\x3e\x99\xeb\x2e\x03\xca\x02\x3c\x54\x02\x00\x35\x2c\xac\x40\x83\x4b\xf7\xab\xa6\xd6\xe2\x7c\x16\x2c\xe9\xdf\xc8\xc3\x73\x64\x3b\xab\x15\x7d\x1c\xfa\xfe\x56\xe8\x65\x2a\x13\xea\x53\x9e\xea\x7b\xe9\x2e\xb5\xbd\x8d\x8b\x00\xc5\x69\xdc\xa5\x12\x09\x97\xb3\x0b\xf7\x62\x09\x8e\x9c\x9f\x44\xbe\x18\x73\xe4\x12\x2e\xdc\x8b\x79\xad\xa5\x89\x9d\xbc\xd7\xfa\xba\x83\x5f\x66\xdf\x84\xc1\xe7\x42\xa0\xaf\x20\x22\x99\x54\xc4\x7f\x00\x7d\xcd\x67\x88\x41\x8c\x75\x0b\x5f\xdd\xd5\xfd\xbe\x9c\xbf\xb1\x73\xcb\xa6\x5f\xda\xf6\x3c\xf1\x23\x22\x26\x2f\x4b\x70\x9e\x27\x8b\xc9\xcb\xfc\xaa\x1c\xa6\x67\xc6\xdf\x5e\x9f\x7a\x52\x89\x4d\x91\xe7\xe7\x89\x54\xf5\x39\x2f\x1d\x89\x6f\x75\xba\x78\x7a\x37\x09\xd2\x7e\xcb\xd4\xfb\xa9\xe5\x5d\x8e\x27\x02\x77\x9b\x62\xd1\xcc\xd9\x2c\xc1\xfc\x37\xcd\x18\x6e\x82\xc5\x2b\xa1\x27\xbe\x15\x76\xed\x7d\xb1\xa4\x12\xf2\x36\x9b\xba\xe2\xdb\x98\x3b\x99\xbc\x3f\x80\x01\xc6\x74\x4f\x75\x59\xf6\xb0\x1f\x0f\x49\xcc\x83\x02\xdc\x62\x60\xaf\x5d\x93\x4a\xb2\x43\xfd\x18\xd7\x78\x0c\xad\x9d\x5c\x34\x84\x99\x43\xe5\xb7\xaf\x5f\x74\xf3\x7d\x44\x41\xc3\x6c\x0e\xeb\xf5\xfa\x64\x2f\x55\x67\x35\xa6\x55\xb6\x55\x41\xbb\x4f\x64\xe7\xbe\xfa\x26\x31\x80\x69\xcd\x2e\x2e\x80\x3f\xa2\xb0\x2f\x7e\x8a\xa7\x68\xb9\x84\x04\x45\x44\x12\xa9\x99\x54\xbe\x1e\x46\x77\xb5\x7b\xc5\xf4\x78\xd6\x57\xde\x1e\x1d\x9a\xa2\xac\xda\x03\x5a\xae\x1a\x27\x26\xe6\xc3\x4c\xcc\xf3\x37\x4c\xcc\xf3\x77\x99\x98\x17\x0d\xea\x9f\x00\x00\x00\xff\xff\x98\x8d\x25\xec\x26\x14\x00\x00")
 
 func embeddedrulesRulesPhpBytes() ([]byte, error) {
 	return bindataRead(
diff --git a/src/cmd/embeddedrules/rules.php b/src/cmd/embeddedrules/rules.php
index 5bee397..9f90778 100644
--- a/src/cmd/embeddedrules/rules.php
+++ b/src/cmd/embeddedrules/rules.php
@@ -260,15 +260,4 @@ function bitwiseOps() {
    * @type bool $y
    */
   $x | $y;
-
-  /**
-   * @maybe Used bitwise operator on something that may not be a numeric type
-   * @type !(int|float) $x
-   * @type !(int|float) $y
-   */
-  any: {
-    $x & $y;
-    $x | $y;
-    $x ^ $y;
-  }
 }


Test patch:
diff --git a/src/tests/golden/testdata/embeddedrules/bitwiseOps.php b/src/tests/golden/testdata/embeddedrules/bitwiseOps.php
index 569afe0..c685f6d 100644
--- a/src/tests/golden/testdata/embeddedrules/bitwiseOps.php
+++ b/src/tests/golden/testdata/embeddedrules/bitwiseOps.php
@@ -20,16 +20,6 @@ function andor_bool_good() {
   $_ = 10 | $x;
 }
 
-function bitwise_non_number(string $s1, string $s2, array $a) {
-  $_ = $s1 & $s2; // Bad 1
-  $_ = $a | $s1;  // Bad 2
-  $_ = $s2 ^ [];  // Bad 3
-
-  $obj1 = new BitwiseExample1();
-  $obj2 = new BitwiseExample2();
-  return $obj1 & $obj2;
-}
-
 /**
  * @param int|float $x
  * @param float|int $y
diff --git a/src/tests/golden/testdata/embeddedrules/golden.txt b/src/tests/golden/testdata/embeddedrules/golden.txt
index 816c4f3..b24df65 100644
--- a/src/tests/golden/testdata/embeddedrules/golden.txt
+++ b/src/tests/golden/testdata/embeddedrules/golden.txt
@@ -64,18 +64,6 @@ WARNING bitwiseOps: Used & bitwise operator over bool operands, perhaps && is in
 WARNING bitwiseOps: Used | bitwise operator over bool operands, perhaps || is intended? at testdata/embeddedrules/bitwiseOps.php:9
   $_ = (($x == 1) | ($x == 2)); // Bad 2
         ^^^^^^^^^^^^^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/embeddedrules/bitwiseOps.php:24
-  $_ = $s1 & $s2; // Bad 1
-       ^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/embeddedrules/bitwiseOps.php:25
-  $_ = $a | $s1;  // Bad 2
-       ^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/embeddedrules/bitwiseOps.php:26
-  $_ = $s2 ^ [];  // Bad 3
-       ^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/embeddedrules/bitwiseOps.php:30
-  return $obj1 & $obj2;
-         ^^^^^^^^^^^^^
 WARNING offBy1: probably intended to use count-1 as an index at testdata/embeddedrules/offBy1.php:7
   $_ = $xs[count($xs)];
        ^^^^^^^^^^^^^^^
diff --git a/src/tests/golden/testdata/math/golden.txt b/src/tests/golden/testdata/math/golden.txt
index 6397f91..2e71052 100644
--- a/src/tests/golden/testdata/math/golden.txt
+++ b/src/tests/golden/testdata/math/golden.txt
@@ -4,18 +4,6 @@ INFO    unused: Variable a is unused (use $_ to ignore this inspection) at testd
 MAYBE   ternarySimplify: could rewrite as `$matches['fractional'] ?? ''` at testdata/math/src/BigNumber.php:90
             $fractional = isset($matches['fractional']) ? $matches['fractional'] : '';
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/math/src/Internal/Calculator.php:584
-                $value = $aBin & $bBin;
-                         ^^^^^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/math/src/Internal/Calculator.php:589
-                $value = $aBin | $bBin;
-                         ^^^^^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/math/src/Internal/Calculator.php:594
-                $value = $aBin ^ $bBin;
-                         ^^^^^^^^^^^^^
-MAYBE   bitwiseOps: Used bitwise operator on something that may not be a numeric type at testdata/math/src/Internal/Calculator.php:622
-        $number = $number ^ $xor;
-                  ^^^^^^^^^^^^^^
 MAYBE   assignOp: could rewrite as `$number ^= $xor` at testdata/math/src/Internal/Calculator.php:622
         $number = $number ^ $xor;
         ^^^^^^^^^^^^^^^^^^^^^^^^