Skip to content

chore: [DevOps] Add PMD rules for public API exposure of model types#777

Merged
Jonas-Isr merged 12 commits intomainfrom
pmd-beta-unstable-api
Mar 3, 2026
Merged

chore: [DevOps] Add PMD rules for public API exposure of model types#777
Jonas-Isr merged 12 commits intomainfrom
pmd-beta-unstable-api

Conversation

@Jonas-Isr
Copy link
Copy Markdown
Member

Context

This PR introduces new PMD rules to check whether code from .model packages get exposed in public API.

It flags the following:

  • non-beta public methods that return or accept types from .model package,
  • non-beta public classes extending .model types,
  • non-beta public Lombok @with annotations on fields with .model types,
  • non-beta public Lombok @Getter/@Setter/@Value/@DaTa on fields with .model types.

Warnings about current violations of these rules are suppressed.

Feature scope:

  • add above rules to PMD
  • suppress warnings on currently released code

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

@Jonas-Isr Jonas-Isr self-assigned this Mar 2, 2026
@Jonas-Isr Jonas-Isr added the please-review Request to review a pull-request label Mar 2, 2026
newtork
newtork previously approved these changes Mar 2, 2026
Copy link
Copy Markdown
Contributor

@newtork newtork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
I would say let's try it out! If we encounter false-positives or decide to no longer care - we can still remove the pmd rule without issues.

Co-authored-by: Alexander Dümont <alexander.duemont@sap.com>
Co-authored-by: Alexander Dümont <alexander.duemont@sap.com>
@Jonas-Isr Jonas-Isr enabled auto-merge (squash) March 2, 2026 15:42
@Jonas-Isr Jonas-Isr merged commit 281b847 into main Mar 3, 2026
6 checks passed
@Jonas-Isr Jonas-Isr deleted the pmd-beta-unstable-api branch March 3, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

please-review Request to review a pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants