-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The patches needed to be adapted to the final PMD 7 changes.
- Loading branch information
Showing
9 changed files
with
55 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/resources/manual_integration_tests/expected_patch_config_3.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 18 additions & 16 deletions
34
...nual_integration_tests/patch_test_case_1_disable_AbstractClassWithoutAbstractMethod.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,49 @@ | ||
From ab94c0fed1813eb5e8376be51a7c93164652e26b Mon Sep 17 00:00:00 2001 | ||
From c4b5364d69ea11a139a4fe9bb11f49124afb22af Mon Sep 17 00:00:00 2001 | ||
From: Andreas Dangel <andreas.dangel@pmd-code.org> | ||
Date: Thu, 4 May 2023 19:44:31 +0200 | ||
Date: Thu, 5 Sep 2024 14:50:24 +0200 | ||
Subject: [PATCH] test case 1 - single java rule changed | ||
|
||
A single rule (java class) is changed. Only this rule should be executed | ||
and only this rule should be compared (ruleset is filtered). | ||
A single rule (java class) is changed. Only this rule should be | ||
executed and only this rule should be compared (ruleset is | ||
filtered). | ||
|
||
The rule "AbstractClassWithoutAbstractMethod" doesn't report | ||
any violations anymore, so false-negatives should appear for | ||
exactly this rule. | ||
--- | ||
.../bestpractices/AbstractClassWithoutAbstractMethodRule.java | 2 +- | ||
.../bestpractices/AbstractClassWithoutAbstractMethodTest.java | 3 +++ | ||
.../java/rule/design/AbstractClassWithoutAnyMethodTest.java | 3 +++ | ||
2 files changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodRule.java | ||
index 0d0d8c33e4..972e1bd62a 100644 | ||
index 835acebd14..5129fa0f15 100644 | ||
--- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodRule.java | ||
+++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodRule.java | ||
@@ -22,7 +22,7 @@ public class AbstractClassWithoutAbstractMethodRule extends AbstractJavaRulechai | ||
} | ||
|
||
if (node.getDeclarations(ASTMethodDeclaration.class).none(ASTMethodDeclaration::isAbstract)) { | ||
- addViolation(data, node); | ||
+ //addViolation(data, node); | ||
- asCtx(data).addViolation(node); | ||
+ //asCtx(data).addViolation(node); | ||
} | ||
return data; | ||
} | ||
diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodTest.java | ||
index b319c5e9f1..77698edb60 100644 | ||
--- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodTest.java | ||
+++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/bestpractices/AbstractClassWithoutAbstractMethodTest.java | ||
diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AbstractClassWithoutAnyMethodTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AbstractClassWithoutAnyMethodTest.java | ||
index a5d9253ee2..2df451e9b8 100644 | ||
--- a/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AbstractClassWithoutAnyMethodTest.java | ||
+++ b/pmd-java/src/test/java/net/sourceforge/pmd/lang/java/rule/design/AbstractClassWithoutAnyMethodTest.java | ||
@@ -4,8 +4,11 @@ | ||
|
||
package net.sourceforge.pmd.lang.java.rule.bestpractices; | ||
package net.sourceforge.pmd.lang.java.rule.design; | ||
|
||
+import org.junit.jupiter.api.Disabled; | ||
+ | ||
import net.sourceforge.pmd.testframework.PmdRuleTst; | ||
import net.sourceforge.pmd.test.PmdRuleTst; | ||
|
||
+@Disabled | ||
class AbstractClassWithoutAbstractMethodTest extends PmdRuleTst { | ||
class AbstractClassWithoutAnyMethodTest extends PmdRuleTst { | ||
// no additional unit tests | ||
} | ||
-- | ||
2.39.2 | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters