Skip to content

[core] Extend the Report class to store custom data objects#3357

Closed
aaronhurst-google wants to merge 1 commit into
pmd:masterfrom
aaronhurst-google:feature-customdata2
Closed

[core] Extend the Report class to store custom data objects#3357
aaronhurst-google wants to merge 1 commit into
pmd:masterfrom
aaronhurst-google:feature-customdata2

Conversation

@aaronhurst-google

Copy link
Copy Markdown
Contributor

Extend the Report class to store custom MergeableData objects, one per runtime type.

Describe the PR

Our org is building some custom PMD rules that require gathering and then post-processing global data. This pull request supports with the former aspect. I think it would be very useful to others.

The MergeableData defines the minimum interface of the stored data, which needs to be merged as the containing Report objects are merged. Our custom Rules add these to the Report (e.g. as method summaries, conditional violations.) They are later consumed by a Renderer, in order to output additional custom information. For example, one of our use cases is to extract properties about test code.

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

…are indexed by runtime object type.

Change-Id: I143de1a332a1fbab562e33946daf041d1f32c0a2
@adangel adangel changed the title Extend the Report class to store custom data objects [core] Extend the Report class to store custom data objects Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant