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] Merge Junit assertion simplification rules · Issue #2908 · pmd/pmd

[java] Merge Junit assertion simplification rules #2908

New issue
Copy link
New issue
Copy link
Closed
#3363
Closed
[java] Merge Junit assertion simplification rules#2908
#3363
Copy link
Assignees
oowekyala
Labels
an:enhancementAn improvement on existing features / rules
Milestone
6.37.0

Description

@oowekyala
oowekyala
opened on Nov 6, 2020
Issue body actions

The following rules:

  • bestpractices.xml
    • UseAssertEqualsInsteadOfAssertTrue
    • UseAssertNullInsteadOfAssertTrue
    • UseAssertSameInsteadOfAssertTrue
    • UseAssertTrueInsteadOfAssertEquals
  • design.xml/SimplifyBooleanAssertion

could be merged together into a new SimplifiableTestAssertion rule. This would

  • make them simpler to reference, you probably want all of them, and SimplifyBooleanAssertion is alone in design.xml
  • simplify the implementation (currently some logic is duplicated between rules)

Category would likely be bestpractices.xml

Motivation for the rule would be readability + better error messages

Additional context
#2899 reimplements many of those, but not SimplifyBooleanAssertion. We can merge them later

Activity

  1. oowekyala
    added
    an:enhancementAn improvement on existing features / rules
    on Nov 6, 2020
  2. oowekyala
    added this to the 7.0.0 milestone on Nov 6, 2020
  3. oowekyala
    self-assigned this
    on Jun 25, 2021
  4. oowekyala
    modified the milestones: 7.0.0, 6.37.0 on Jun 25, 2021
  5. oowekyala
    added a commit that references this issue on Jun 25, 2021

    Fix pmd#2908 - new rule SimplifiableTestAssertion

    This issue will close once commit 4dba533 is merged into the 'main' branch.
    4dba533
  6. adangel
    closed this as completedin 4dba533on Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @oowekyala
    oowekyala

Labels

an:enhancementAn improvement on existing features / rules

Type

No type

Projects

No projects

    Milestone

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