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 pattern for test classes in ClassNamingConventions rule for Java · Issue #2867 · pmd/pmd

[java] Separate pattern for test classes in ClassNamingConventions rule for Java #2867

New issue
Copy link
New issue
Copy link
Closed
#4195
Closed
[java] Separate pattern for test classes in ClassNamingConventions rule for Java#2867
#4195
Copy link
Labels
an:enhancementAn improvement on existing features / rules
Milestone
6.52.0

Description

@sabi0
sabi0
opened on Oct 23, 2020
Issue body actions

Apex has testClassPattern - https://pmd.github.io/latest/pmd_rules_apex_codestyle.html#classnamingconventions

Java doesn't - https://pmd.github.io/latest/pmd_rules_java_codestyle.html#classnamingconventions

Having test classes names consistently end with "Test" is important to make sure they are correctly picked up by Maven Surefire plugin. I would say this is even more important than following other naming conventions.

Reacted by Linus Fernandes, psheffield24 and Liam Sharp

Activity

  1. sabi0
    added
    an:enhancementAn improvement on existing features / rules
    on Oct 23, 2020
  2. oowekyala
    changed the title [-]Separate pattern for test classes in ClassNamingConventions rule for Java[/-] [+][java] Separate pattern for test classes in ClassNamingConventions rule for Java[/+] on Nov 5, 2020
  3. adangel commented on Oct 28, 2022

    @adangel
    adangel
    on Oct 28, 2022
    Member
    More actions

    Note: Since PMD 6.51.0, the rule TestClassWithoutTestCases has a testClassPattern (#4162) - but here it's the other way around: we need to detect class, that don't follow the testClassPattern, but are probably tests (by checking the imports or the used annotations or the base class junit.TestCase)

  4. adangel
    added this to the 6.52.0 milestone on Nov 4, 2022
  5. adangel
    added a commit that references this issue on Nov 4, 2022

    [java] ClassNamingConventions - add new property testClassPattern

    This issue will close once commit 11a4940 is merged into the 'main' branch.
    11a4940
  6. oowekyala
    closed this as completedin 11a4940on Nov 12, 2022
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 / rules

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.52.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.