Skip to content

Fix #5257: [java] NonCaseLabelInSwitch - support switch expressions#5256

Merged
adangel merged 3 commits intopmd:mainfrom
adangel:rename-nocaselabelswitch
Oct 24, 2024
Merged

Fix #5257: [java] NonCaseLabelInSwitch - support switch expressions#5256
adangel merged 3 commits intopmd:mainfrom
adangel:rename-nocaselabelswitch

Conversation

@adangel
Copy link
Copy Markdown
Member

@adangel adangel commented Oct 5, 2024

And another switch related rule...

Describe the PR

Also rename rule from NonCaseLabelInSwitchStatement

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

Related issues

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)

Rename rule from NonCaseLabelInSwitchStatement

- as it applies to both switch statements and switch expressions
- extend the test cases to cover new java syntax
@adangel adangel added the an:enhancement An improvement on existing features / rules label Oct 5, 2024
@adangel adangel added this to the 7.7.0 milestone Oct 5, 2024
Comment thread pmd-java/src/main/resources/category/java/errorprone.xml Outdated
@ghost
Copy link
Copy Markdown

ghost commented Oct 5, 2024

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

Generated by 🚫 Danger

@adangel adangel changed the title [java] NonCaseLabelInSwitch - support switch expressions Fix #5257: [java] NonCaseLabelInSwitch - support switch expressions Oct 6, 2024
@adangel adangel merged commit 62c2858 into pmd:main Oct 24, 2024
@adangel adangel deleted the rename-nocaselabelswitch branch October 24, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

an:enhancement An improvement on existing features / rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[java] NonCaseLabelInSwitch should consider switch expressions

1 participant