mbien opened a new pull request #3540:
URL: https://github.com/apache/netbeans/pull/3540
`referencedIn(v, in)` did not match if `in` was a single variable.
example:
```java
for(int $i = $from; $i < $to; $i++) {
$array[$i] = $n;
}
:: !referencedIn($i, $n) && !matchesAny($n, "$i") /*&& more()*/ =>
java.util.Arrays.fill($array, $n);
;;
```
needed an extra `!matchesAny($n, "$i")` to make sure `$n` is not actually
equal to `$i`. (i+1 would be matched by `referencedIn` but not i). After this
PR `matchesAny` is no longer needed.
* added a small optimization which adds a fast path to the recursion if a
result has been already determined.
* couldn't find tests for referencedIn so I added some.
btw the in-editor test integration for rule files is super cool
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists