Skip to content

Fix false positive when parsing with PHP_CodeSniffer#18

Open
r-a-y wants to merge 1 commit intosop:masterfrom
r-a-y:fix/phpcs
Open

Fix false positive when parsing with PHP_CodeSniffer#18
r-a-y wants to merge 1 commit intosop:masterfrom
r-a-y:fix/phpcs

Conversation

@r-a-y
Copy link
Copy Markdown

@r-a-y r-a-y commented May 31, 2022

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.

@coveralls
Copy link
Copy Markdown

Coverage Status

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

@MPParsley
Copy link
Copy Markdown

I opened an issue for this: PHPCompatibility/PHPCompatibility#1345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants