Update JavaParser version and fix configured smells being ignored#26
Update JavaParser version and fix configured smells being ignored#26marvinkreis wants to merge 2 commits intoTestSmells:masterfrom
Conversation
Save smell factories instead of smells in TestSmellDetector, so the configured tests can be re-initialized whenever needed. (See TestSmells#19)
|
Hi. Sorry for positing this PR with no context at all. I was in a bit of a hurry when I opened it, so let me elaborate a bit: We use TestSmellDetector over at Code Defenders to analyze user-submitted test cases and I'm currently updating our analysis to support newer Java Versions. This made it incompatible with TestSmellDetector, because our internal JavaParser version clashed with TestSmellDetector's. I don't know if you're interested in updating to a newer JavaParser version, but since I already updated it for Code Defenders I thought I might as well open an PR. The other changes have to do with b7e1aaf (the fix to #19), which re-initialized the smells every time List<SmellFactory> testSmells = new ArrayList<>();
testSmells.add(AssertionRoulette::new);
testSmells.add(DuplicateAssert::new);
detector.setTestSmells(testSmells);instead of List<AbstractSmell> testSmells = new ArrayList<>();
testSmells.add(new AssertionRoulette());
testSmells.add(new DuplicateAssert());
detector.setTestSmells(testSmells); |
Created forked version of TestSmellDetector to update it to JavaParser version 3.24.4. See TestSmells/TestSmellDetector#26
This updates the JavaParser dependency to the most recent version to enable support for newer Java versions (up to 17 preview).
Also fixes a bug introduced in the fix to #19, where configured smells from
setTestSmells()were overwritten.Note that this changes
TestSmellDetector::setTestSmells(List<AbstractSmell> testSmells)toTestSmellDetector::setTestSmells(List<SmellFactory> testSmells)to ensure smells can be re-initialized.