Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Add option to suppress potential issues on a line level basis #34

Open
TysonAndre opened this issue Jul 12, 2017 · 0 comments
Open

Add option to suppress potential issues on a line level basis #34

TysonAndre opened this issue Jul 12, 2017 · 0 comments

Comments

@TysonAndre
Copy link

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant