From 582816893404490bd830d1874bc515814deb0426 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 1 Oct 2021 18:50:33 +0200 Subject: [PATCH] [java] Update rule NonCaseLabelInSwitchStatement --- .ci/files/all-java.xml | 2 +- pmd-java/src/main/resources/category/java/errorprone.xml | 4 ++-- .../rule/errorprone/NonCaseLabelInSwitchStatementTest.java | 1 - .../rule/errorprone/xml/NonCaseLabelInSwitchStatement.xml | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/files/all-java.xml b/.ci/files/all-java.xml index e64d5e6144..13e0902472 100644 --- a/.ci/files/all-java.xml +++ b/.ci/files/all-java.xml @@ -237,7 +237,7 @@ - + diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index 1849bd2e26..6646620369 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -2428,12 +2428,12 @@ public class Foo { externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_errorprone.html#noncaselabelinswitchstatement"> A non-case label (e.g. a named break/continue label) was present in a switch statement. -This legal, but confusing. It is easy to mix up the case labels and the non-case labels. +This is legal, but confusing. It is easy to mix up the case labels and the non-case labels. 3 - //SwitchStatement//BlockStatement/Statement/LabeledStatement + //SwitchStatement//LabeledStatement diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/NonCaseLabelInSwitchStatementTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/NonCaseLabelInSwitchStatementTest.java index 255ac134a4..ab4a88a5d8 100644 --- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/NonCaseLabelInSwitchStatementTest.java +++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/errorprone/NonCaseLabelInSwitchStatementTest.java @@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.java.rule.errorprone; import net.sourceforge.pmd.testframework.PmdRuleTst; -@org.junit.Ignore("Rule has not been updated yet") public class NonCaseLabelInSwitchStatementTest extends PmdRuleTst { // no additional unit tests } diff --git a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonCaseLabelInSwitchStatement.xml b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonCaseLabelInSwitchStatement.xml index 5e37a088b6..b2ba4cecd0 100644 --- a/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonCaseLabelInSwitchStatement.xml +++ b/pmd-java/src/test/resources/net/sourceforge/pmd/lang/java/rule/errorprone/xml/NonCaseLabelInSwitchStatement.xml @@ -7,6 +7,7 @@ label inside switch 1 + 6