VKCOM / noverify

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

Multiple `@path` directives #1208

Closed vkaverin closed 2 months ago

vkaverin commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently, it's forbidden to put multiple @paths for single rule. Rule like

/**
  * @warning Do not use `foo()`!
  * 
  * @path www/A/
  * @path www/B/
  */
foo();

will end up with duplicate @path constraint error.

So, to apply rule foo() for both www/A/ and www/B/ it's necessary to copy-paste the rule for them individually:

/**
  * @warning Do not use `foo()`!
  * 
  * @path www/A/
  */
foo();

/**
  * @warning Do not use `foo()`!
  * 
  * @path www/B/
  */
foo();

Describe the solution you'd like

Allow to specify @paths and merge them.