Skip to content

Commit

Permalink
Merge pull request #2 from PHPCompatibility/feature/prevent-false-pos…
Browse files Browse the repository at this point in the history
…itives-on-polyfill-code

Ruleset: prevent false positives on random_compat polyfill code
  • Loading branch information
wimg authored Oct 8, 2018
2 parents 67d89dc + cdd0895 commit d66dceb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions PHPCompatibilityParagonieRandomCompat/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,24 @@
<exclude name="PHPCompatibility.Classes.NewClasses.typeerrorFound"/>
</rule>

<!-- Prevent false positives being thrown when run over the code of random_compat itself. -->
<rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
<exclude-pattern>/random_compat/lib/byte_safe_strings\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.NewFunctions.stream_set_chunk_sizeFound">
<exclude-pattern>/random_compat/lib/random_bytes_dev_urandom\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_dev_urandomDeprecatedRemoved">
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
<exclude-pattern>/random_compat/lib/random_bytes_mcrypt\.php$</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.LanguageConstructs.NewLanguageConstructs.t_ns_separatorFound">
<exclude-pattern>/random_compat/lib/random_bytes_libsodium\.php$</exclude-pattern>
</rule>

</ruleset>

0 comments on commit d66dceb

Please sign in to comment.