GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] Separate test sources and resources · Issue #5746 · pmd/pmd

[java] Separate test sources and resources #5746

New issue
Copy link
New issue
Copy link
Closed
#6619
Closed
[java] Separate test sources and resources#5746
#6619
Copy link
Labels
an:enhancementAn improvement on existing features / rulesin:testingAbout tests of pmd, eg the module pmd-lang-test or pmd-test [test]
Milestone
7.25.0

Description

@oowekyala
oowekyala
opened on May 15, 2025
Issue body actions

Is your feature request related to a problem? Please describe.
The test tree of pmd-java has some classes that are not functional code, but that we put there so that it gets compiled and then we can use the compiled classes in tests. This code is test data, and should be separate from the actual test sources. If we separate them then we can run more static analysis on our test sources and keep that part of the codebase cleaner.

Describe the solution you'd like
Create a new source tree pmd-java/src/test/java-resources, and let it be compiled by javac. pmd-java/src/test/java should have a dependency on those. Move the test data files there.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context #5738 found a couple instances of UnusedPrivateMethod that we should legitimately fix. The rule is not used on our test sources precisely because they're mixed with the test data code, and legit violations could be mixed with bogus violations.

Activity

  1. oowekyala
    added
    an:enhancementAn improvement on existing features / rules
    in:testingAbout tests of pmd, eg the module pmd-lang-test or pmd-test [test]
    on May 15, 2025
  2. adangel
    added this to the 7.25.0 milestone on May 14, 2026
  3. adangel
    added a commit that references this issue on May 14, 2026

    [doc] Update release notes (#6619, #5746)

    af3a78b
  4. adangel
    closed this as completedin 2fca8e1on May 14, 2026
  5. adangel
    added a commit that references this issue on May 14, 2026

    [java] Fix pmd#5746: Separate test sources and resources (pmd#6619)

    This issue will close once commit 2fca8e1 is merged into the 'main' branch.
    2fca8e1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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]

    Type

    No type

    Projects

    No projects

      Milestone

      • 7.25.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.