asn1 icon indicating copy to clipboard operation
asn1 copied to clipboard

Fix false positive when parsing with PHP_CodeSniffer

Open r-a-y opened this issue 3 years ago • 2 comments

Hi, we run PHP_CodeSniffer (phpcs) across our codebase and one of the projects in our codebase uses your asn1 library.

phpcs is throwing a PHPCompatibility.Miscellaneous.ValidIntegers.HexNumericStringFound notice for a small part of your code.

After reading up about this notice here: https://www.zend.com/php-migration/misc/hex-numeric-string

It looks like this is a false positive, so what I've done in this PR is add a rule to disable this specific notice from phpcs. See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file

Let me know if you have any questions.

r-a-y avatar May 31 '22 17:05 r-a-y

Coverage Status

Coverage remained the same at 99.848% when pulling 0ddc1da846cc8d445d38ec6244f6d0d3bb106287 on r-a-y:fix/phpcs into 074efe8f7c353c54edc809ac3d74efda83edd776 on sop:master.

coveralls avatar May 31 '22 17:05 coveralls

I opened an issue for this: https://github.com/PHPCompatibility/PHPCompatibility/issues/1345

MPParsley avatar Aug 31 '22 17:08 MPParsley