Open cal101 opened 7 years ago
Cal, probably is something more hard to find. I keep working on it
I don't want to spend too much time extracting real test cases for everything.
Let's do a first run of the bugs that are easy to reproduce (and to fix) and do a second run for the difficult ones where I can try to extract real test cases.
I don't plan to use the PMD plugin at all but just noticed a thing or two when playing with it.
Ok,
I have fixed some important issues and I think that most of those that you reported are pretty much related. Let's see what happens.
I have created a test for it and it does not break. When I print the source code is exactly the same https://github.com/walkmod/walkmod-pmd-plugin/commit/8781ce698709648f891147e039b542d887d6adca
Did you try my test case?
git clone http://github.com/cal101/walkmod-misc.git
cd walkmod-misc/
git branch pmd-plugin-tests origin/pmd-plugin-tests
git checkout pmd-plugin-tests
rm -rf ~/.m2/repository
rm -rf ~/.ivy2
mvn compile
walkmod apply -e
git diff
diff --git a/src/main/java/de/walkmod/pmd/RemoveOfUsedVar1.java b/src/main/java/de/walkmod/pmd/RemoveOfUsedVar1.java
index 41956c6..878bfd4 100644
--- a/src/main/java/de/walkmod/pmd/RemoveOfUsedVar1.java
+++ b/src/main/java/de/walkmod/pmd/RemoveOfUsedVar1.java
@@ -7,8 +7,6 @@ import javax.swing.JTextField;
public class RemoveOfUsedVar1 {
private JTextField jYear;
- private JTextField jMonth;
- private JTextField jDay;
public void setToday() {
Calendar today = Calendar.getInstance();