Multifile Rules - Global start and end? #4565
Replies: 1 comment 3 replies
-
No, rules do not get notified of global analysis events (notice that multiple rule instances may be created during a single analysis, usually one per analysis thread, so this would not make sense). You can get around this (in a very hacky way) through a custom What you seem to be trying to do is create a 2-phase analysis, with a first data collection stage during file processing, and an actual analysis phase creating violations upon end. This however would not work as it stands:
Beyond finding unused non-private methods or coupling issues, we have so far not found a use case for 2-phase analysis to help us prioritize this. Feel free to chip in if you have another one. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to know, when PMD starts and ends the analysis of all files?
I've read (#4508), that it calls the Custom Rules for every file once, so start and end in AbstractRule are called only per file.
Beta Was this translation helpful? Give feedback.
All reactions