Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] XPath cleanups #4804

Merged
merged 7 commits into from Feb 9, 2024
Merged

Conversation

adangel
Copy link
Member

@adangel adangel commented Jan 20, 2024

Describe the PR

  • Small changes:
    • package move of XPathRule to n.s.pmd.lang.rule.xpath
    • remove the deprecation version property - that means, setting a property version in ruleset.xml now creates an error
  • Bigger changes:
    • For implementing custom XPath function, we now have an own API in PMD (See classes/interfaces n.s.pmd.lang.rule.xpath.impl.XPathFunctionDefinition). This avoids the direct dependency on Saxon - Saxon is only used for the implementation (in internal packages).
    • The API only supports what we currently use and doesn't expose every feature from Saxon. So, in case something is missing for a future custom XPath function, we need to extend the API.
    • There is currently no documentation (as far as I know) that explains how to implement a custom XPath function. See [doc] How to implement a custom XPath function for a language #4807.
    • This API is anyway new with PMD 7, so no need to updating migration guide etc. Right now, the API lives in impl, so it is for now anyway considered internal.

Related issues

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)

@adangel adangel added this to the 7.0.0 milestone Jan 20, 2024
@adangel adangel changed the title Issue 4309 xpath cleanups [core] XPath cleanups Jan 20, 2024
@adangel adangel mentioned this pull request Jan 20, 2024
55 tasks
@pmd-test
Copy link

pmd-test commented Jan 20, 2024

1 Message
📖 Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

@adangel adangel marked this pull request as ready for review January 25, 2024 14:07
@adangel adangel merged commit 5931461 into pmd:master Feb 9, 2024
3 checks passed
@adangel adangel deleted the issue-4309-xpath-cleanups branch February 9, 2024 16:57
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.

[core] Cleanups in XPath area
2 participants