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] Avoid using getImage/@Image #4782

Merged
merged 12 commits into from
Feb 2, 2024
Merged

[core] Avoid using getImage/@Image #4782

merged 12 commits into from
Feb 2, 2024

Conversation

adangel
Copy link
Member

@adangel adangel commented Dec 19, 2023

Describe the PR

This refactors javascript, modelica, scala, vm and html to not rely anymore on getImage(), so that we can remove it in core.

For supporting the special case in html, I introduced two interfaces: TextNode and CommentNode.

Technically, this doesn't need to be part of 7.0.0, I was just curious what we would need to do, to get rid of getImage(). On the other side, merging this, then it would be done (at least for these languages).

Note: in html, I introduced some incompatibility (getText() now returns the normalized text - which was previously available through getNormalizedText(), and getWholeText() return the raw text - which was previously getText()).

Note 2: This PR is independent of #4777, but some minor merge conflicts will arise probably.

Note 3: Of course this creates breaking changes, since e.g. @Image no longer is available. If merged after 7.0.0, then this must be re-added as deprecated.

Related issues

  • none

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 the in:pmd-internals Affects PMD's internals label Dec 19, 2023
@ghost
Copy link

ghost commented Dec 19, 2023

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
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 added this to the 7.0.0 milestone Jan 6, 2024
@adangel adangel changed the title Avoid using getImage/@Image [core] Avoid using getImage/@Image Jan 6, 2024
@adangel
Copy link
Member Author

adangel commented Jan 6, 2024

I think, we should just do this for PMD 7 - that's the time where we can actually ship some breaking changes. For the remaining languages (Apex, Java, PLSQL, Visualforce), getImage/@image is still in use and needs to be done in 7.x - see #4787 .

@adangel adangel merged commit 2fbe5cb into pmd:master Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:pmd-internals Affects PMD's internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant