Skip to content

[test] Remove duplicated Dummy language module #2435

@oowekyala

Description

@oowekyala

Is your feature request related to a problem? Please describe.
There's currently a "dummy" language module in the pmd-core test sources and one in the main pmd-test sources. They're a pain to keep in sync on the 7.0.x branch, and they're perfect duplicates. It also seems like the only usages of those DummyNodes in the pmd-test module are... in the tests of pmd-test

Describe the solution you'd like
Just make the test sources of pmd-test depend on the test sources of pmd-core, and remove the dummy module from pmd-test. https://stackoverflow.com/questions/174560/sharing-test-code-in-maven

This would remove the ability to use dummy nodes in external code that depends on pmd-test, but I think, they may use a real language module to fake nodes? I can't really think of a reason why anyone would want to build fake trees by hand outside of our test sources

Describe alternatives you've considered

  1. Don't change anything, keep syncing the sources manually. This is a pain
  2. Put the "dummy" language module in the main sources of PMD core. This would have some advantages, but then we'd have to make a commitment to binary compatibility over versions... and it would show up in LanguageRegistry

Metadata

Metadata

Assignees

No one assigned

    Labels

    an:enhancementAn improvement on existing features / rulesin:testingAbout tests of pmd, eg the module pmd-lang-test or pmd-test [test]is:feature-removalRemove an unneeded unused feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions