php7mar icon indicating copy to clipboard operation
php7mar copied to clipboard

Add option to suppress potential issues on a line level basis

Open TysonAndre opened this issue 8 years ago • 0 comments

This may be useful on large codebases, to track issues that were investigated and found to be false positives (especially if changes will be made later before running php7mar again, and one wants to know which issues were already investigated)

Proposed syntax:

Add a comment with @suppress php7mar-<issue type> [optional description] anywhere in the line where the issue would be emitted.

Example:

foreach ($foo as &$value) { // @suppress php7mar-syntax (nothing else is iterating over this array)

(Without this proposed suppression, php7mar would emit a syntax error in the report warning about changed behavior of foreach by reference)

TysonAndre avatar Jul 12 '17 20:07 TysonAndre