Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: pmd/pmd-github-action@v2.0.0
id: pmd
with:
version: '7.17.0'
version: '7.18.0'
rulesets: 'ddk-configuration/pmd/ruleset.xml'
analyzeModifiedFilesOnly: false
- name: Fail build if there are violations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.eclipse.xtext.validation.CheckType;
import org.eclipse.xtext.validation.ComposedChecks;
import org.eclipse.xtext.validation.ValidationMessageAcceptor;
import org.eclipse.xtext.xbase.XBlockExpression;
import org.eclipse.xtext.xbase.XExpression;
import org.eclipse.xtext.xbase.XReturnExpression;
import org.eclipse.xtext.xbase.XbasePackage;
Expand Down Expand Up @@ -530,7 +529,7 @@ public void checkGuardsFirst(final Context context) {
return; // no guards makes check irrelevant
}

EList<XExpression> topLevelExpressions = (EList<XExpression>) ((XBlockExpression) context.getConstraint()).eGet(XbasePackage.Literals.XBLOCK_EXPRESSION__EXPRESSIONS);
EList<XExpression> topLevelExpressions = (EList<XExpression>) context.getConstraint().eGet(XbasePackage.Literals.XBLOCK_EXPRESSION__EXPRESSIONS);

for (final XGuardExpression guard : guards) {
final EStructuralFeature eContainingFeature = guard.eContainingFeature();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ public boolean containsOpposite(final List<ElementLocator> locators, final Eleme
boolean isSameIndentColumnLocator = candidateLocator instanceof FixedLocator
&& ((FixedLocator) candidateLocator).getColumn() == ((FixedLocator) locator).getColumn();
if (isSameIndentColumnLocator) {
boolean isOppositeToAfter = ((FixedLocator) candidateLocator).getRight() != null && ((FixedLocator) locator).getRight() == null;
boolean isOppositeToBefore = ((FixedLocator) candidateLocator).getLeft() != null && ((FixedLocator) locator).getLeft() == null;
boolean isOppositeToAfter = candidateLocator.getRight() != null && locator.getRight() == null;
boolean isOppositeToBefore = candidateLocator.getLeft() != null && locator.getLeft() == null;
if (isOppositeToAfter || isOppositeToBefore) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion ddk-configuration/pmd/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<exclude name="AssignmentToNonFinalStatic"/>
<exclude name="AvoidAccessibilityAlteration"/>
<exclude name="AvoidBranchingStatementAsLastInLoop"/>
<exclude name="AvoidCatchingGenericException"/><!--Checkstyle-->
<exclude name="AvoidCatchingThrowable"/><!--Checkstyle-->
<exclude name="AvoidDuplicateLiterals"/><!--Checkstyle-->
<exclude name="AvoidLiteralsInIfCondition"/><!--Checkstyle-->
Expand Down Expand Up @@ -44,7 +45,6 @@
<exclude name="AvoidSynchronizedStatement"/><!-- Only applies to virtual threads on Java 21, which we do not use, the problem might be solved in a later vm -->
</rule>
<rule ref="category/java/design.xml">
<exclude name="AvoidCatchingGenericException"/><!--Checkstyle-->
<exclude name="AvoidDeeplyNestedIfStmts"/>
<exclude name="AvoidRethrowingException"/>
<exclude name="AvoidUncheckedExceptionsInSignatures"/>
Expand Down
2 changes: 1 addition & 1 deletion ddk-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<spotbugs.plugin.version>4.9.8.1</spotbugs.plugin.version>
<spotbugs.version>4.9.8</spotbugs.version>
<pmd.plugin.version>3.28.0</pmd.plugin.version>
<pmd.version>7.17.0</pmd.version>
<pmd.version>7.18.0</pmd.version>
<tycho.version>5.0.0</tycho.version>
<xtend.version>2.40.0</xtend.version>
</properties>
Expand Down