Skip to content

[java] Rename rule DefaultLabelNotLastInSwitch#5255

Merged
adangel merged 3 commits into
pmd:mainfrom
adangel:rename-defaultlabelswitch
Oct 24, 2024
Merged

[java] Rename rule DefaultLabelNotLastInSwitch#5255
adangel merged 3 commits into
pmd:mainfrom
adangel:rename-defaultlabelswitch

Conversation

@adangel

@adangel adangel commented Oct 5, 2024

Copy link
Copy Markdown
Member

Another switch-related rule...

Describe the PR

  • as it applies to both switch statements and switch expressions
    • this was already the case, the rule has not changed
  • extend the test cases to cover new java syntax

Note: For patterns in switch, the java compiler already makes sure, that default is the last case.

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)

- as it applies to both switch statements and switch expressions
- extend the test cases to cover new java syntax

Note: For patterns in switch, the java compiler already makes sure, that
default is the last case.
@adangel adangel added this to the 7.7.0 milestone Oct 5, 2024
@ghost

ghost commented Oct 5, 2024

Copy link
Copy Markdown
1 Message
📖 Compared to main:
This changeset changes 0 violations,
introduces 58 new violations, 0 new errors and 0 new configuration errors,
removes 58 violations, 0 errors and 0 configuration errors.
Download full report as build artifact
Compared to main:
This changeset changes 0 violations,
introduces 58 new violations, 0 new errors and 0 new configuration errors,
removes 58 violations, 0 errors and 0 configuration errors.
Download full report as build artifact

Generated by 🚫 Danger

@adangel adangel merged commit 0d8878d into pmd:main Oct 24, 2024
@adangel adangel deleted the rename-defaultlabelswitch branch October 24, 2024 13:02
* {% rule java/bestpractices/UnitTestShouldUseAfterAnnotation %} (Java Best Practices) has been renamed from `JUnit4TestShouldUseAfterAnnotation`.
* {% rule java/bestpractices/UnitTestShouldUseBeforeAnnotation %} (Java Best Practices) has been renamed from `JUnit4TestShouldUseBeforeAnnotation`.
* {% rule java/bestpractices/UnitTestShouldUseTestAnnotation %} (Java Best Practices) has been renamed from `JUnit4TestShouldUseTestAnnotation`.
* {% rule java/bestpractices/DefaultLabelNotLastInSwitch %} (Java Best Practices) has been renamed from `DefaultLabelNotLastInSwitch`, as it also

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... from DefaultLabelNotLastInSwitchStmt ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants