Skip to content

Commit 842b965

Browse files
joaodinissfrubenporras
authored andcommitted
Update pmd to 7.12.0
1 parent ee36070 commit 842b965

File tree

6 files changed

+9
-20
lines changed

6 files changed

+9
-20
lines changed

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/builder/util/CheckMarkerHelpExtensionHelper.java

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import java.util.Collections;
1414
import java.util.List;
15+
import java.util.Locale;
1516
import java.util.NoSuchElementException;
1617
import java.util.Set;
1718

@@ -34,7 +35,6 @@
3435

3536
import com.avaloq.tools.ddk.check.check.Check;
3637
import com.avaloq.tools.ddk.check.check.CheckCatalog;
37-
import com.avaloq.tools.ddk.check.check.TriggerKind;
3838
import com.avaloq.tools.ddk.check.check.XIssueExpression;
3939
import com.avaloq.tools.ddk.check.generator.CheckGeneratorExtensions;
4040
import com.avaloq.tools.ddk.check.generator.CheckGeneratorNaming;
@@ -56,7 +56,7 @@ public class CheckMarkerHelpExtensionHelper extends AbstractCheckDocumentationEx
5656
private static final String MARKERHELP_ELEMENT = "markerHelp";
5757
public static final String CONTEXT_ID_ATTRIBUTE_TAG = "helpContextId";
5858
public static final String MARKERTYPE_ATTRIBUTE_TAG = "markerType";
59-
private static final String CHECKTYPE_PRAEFIX = "org.eclipse.xtext.ui.check";
59+
private static final String CHECKTYPE_PREFIX = "org.eclipse.xtext.ui.check";
6060
private static final String ATTRIBUTE_ELEMENT = "attribute";
6161
private static final String ATTRIBUTE_NAME_TAG = "name";
6262
public static final String ATTRIBUTE_VALUE_TAG = "value";
@@ -260,17 +260,7 @@ private boolean isCatalogContextId(final QualifiedName catalog, final URI uri, f
260260
* @return the check type
261261
*/
262262
private String getCheckType(final Check check) {
263-
TriggerKind trigger = check.getKind();
264-
switch (trigger) {
265-
case FAST:
266-
return CHECKTYPE_PRAEFIX + ".fast";
267-
case NORMAL:
268-
return CHECKTYPE_PRAEFIX + ".normal";
269-
case EXPENSIVE:
270-
return CHECKTYPE_PRAEFIX + ".expensive";
271-
default:
272-
return null;
273-
}
263+
return CHECKTYPE_PREFIX + '.' + check.getKind().toString().toUpperCase(Locale.ENGLISH);
274264
}
275265

276266
@Override

com.avaloq.tools.ddk.check.ui/src/com/avaloq/tools/ddk/check/ui/labeling/CheckImages.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public Image forSeverityRange() {
8282

8383
/**
8484
* Returns an image for a Check according to its severity (error, warning, info, ignore).
85-
*
85+
*
8686
* @param severity
8787
* the severity of the check
8888
* @return an image representing a Check
@@ -96,7 +96,6 @@ public Image forCheck(final SeverityKind severity) {
9696
case INFO:
9797
return imageHelper.getImage(INFO_IMAGE);
9898
default:
99-
case IGNORE:
10099
return imageHelper.getImage(IGNORE_IMAGE);
101100
}
102101
}
@@ -108,7 +107,7 @@ public Image forContext() {
108107

109108
/**
110109
* Return an Image shared by JDT.
111-
*
110+
*
112111
* @param descriptor
113112
* an image descriptor (path)
114113
* @return the corresponding image

com.avaloq.tools.ddk.checkcfg.ui/src/com/avaloq/tools/ddk/checkcfg/ui/labeling/CheckCfgImages.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public Image forConfiguredCatalog() {
4949

5050
/**
5151
* Returns an image for a Configured Check according to its severity (error, warning, info, ignore).
52-
*
52+
*
5353
* @param severity
5454
* the severity of the check
5555
* @return an image representing a Configured Check
@@ -63,7 +63,6 @@ public Image forConfiguredCheck(final SeverityKind severity) {
6363
case INFO:
6464
return imageHelper.getImage(INFO_IMAGE);
6565
default:
66-
case IGNORE:
6766
return imageHelper.getImage(IGNORE_IMAGE);
6867
}
6968
}

com.avaloq.tools.ddk.test.core/src/com/avaloq/tools/ddk/test/core/ITestEntityActionProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public interface ITestEntityActionProvider {
2020

2121
/**
2222
* Returns the {@link TestEntityAction}s of this {@link ITestEntityActionProvider}.
23-
*
23+
*
2424
* @return the {@link TestEntityAction}s, never {@code null}
2525
*/
2626
List<TestEntityAction> getTestEntityActions();

ddk-configuration/pmd/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
<exclude name="DefaultLabelNotLastInSwitch"/>
7777
<exclude name="ForLoopCanBeForeach"/>
7878
<exclude name="GuardLogStatement"/><!--TODO-->
79+
<exclude name="ImplicitFunctionalInterface"/>
7980
<exclude name="UnitTestAssertionsShouldIncludeMessage"/>
8081
<exclude name="UnitTestContainsTooManyAsserts"/><!--New after PMD 5.3 upgrade, limitation to 1 assert not sensible, would need customization, disabled for the time being-->
8182
<exclude name="UnitTestShouldIncludeAssert"/>

ddk-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<spotbugs.plugin.version>4.9.2.0</spotbugs.plugin.version>
5454
<spotbugs.version>4.9.0</spotbugs.version>
5555
<pmd.plugin.version>3.26.0</pmd.plugin.version>
56-
<pmd.version>7.11.0</pmd.version>
56+
<pmd.version>7.12.0</pmd.version>
5757
<tycho.version>4.0.12</tycho.version>
5858
<xtend.version>2.38.0</xtend.version>
5959
</properties>

0 commit comments

Comments
 (0)