VKCOM / noverify

Pretty fast linter (code static analysis utility) for PHP
MIT License
673 stars 57 forks source link

Add dynamic plugins filters for variable names from phpgrep #1179

Closed i582 closed 2 years ago

i582 commented 2 years ago

Sometimes in dynamic rules we want to be able to specify a specific name or regular expression for a variable to match.

For example:

function forbid_id_var() {
  /**
   * @maybe Not use $id variable
   * @filter id "^id$"
   */
  $id;
}