[core] Inconsistent behavior of Rule.start/Rule.end
A source code analyzer
Brought to you by:
adangel,
juansotuyo
See also [#1506].
Looking at the code, there is a difference in when/how often start&end is called: MonoThreadProcessor
calls it for each file, while the MultiThreadProcessor calls it only once - and for a ruleset instance, that is
never used, as for the threads, new rule instances will be created.
PR submitted at https://github.com/pmd/pmd/pull/190
It will be: Once Per File.
Sharing data for one rule between files must happen differently, as in multithreaded case, multiple instances of the rule will be running. So you'll need some kind of static/shared data, if you need to analyze more than one class...
Thanks for fixing!