[core] Support global rules that report at the end of analysis #3920
Labels
a:RFC
A drafted proposal on changes to PMD, up for feedback form the team and community
an:enhancement
An improvement on existing features / rules
Milestone
Note I don't expect this idea to be implemented as is, but the use case is worth describing. See the "alternatives" section.
Is your feature request related to a problem? Please describe.
Some unseful rules could be written if we had infrastructure to report violations at the end of the analysis, giving the rule a global view on the analysed project.
In particular, CPD could be made a PMD rule (depends on #3919) using this infrastructure. Other copy-paste detection mechanisms could be written using this logic (eg tree-based copy detection).
Describe the solution you'd like
TBD, key concerns are
Describe alternatives you've considered
This might be unfeasible as-is given the difficulty about renderers stated above. Maybe we should instead support rules that work in 2 passes (indexing + actual analysis).
Additional context
See also #3355 for a rejected proposal.
The text was updated successfully, but these errors were encountered: