Skip to content

Commit

Permalink
Add groovy file checker as precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurens-W committed Dec 2, 2024
1 parent 2a583d6 commit 6da3c7f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.openrewrite.java.tree.J;
import org.openrewrite.java.tree.JavaType;
import org.openrewrite.java.tree.TypeUtils;
import org.openrewrite.staticanalysis.groovy.GroovyFileChecker;
import org.openrewrite.staticanalysis.kotlin.KotlinFileChecker;

import java.util.*;
Expand Down Expand Up @@ -71,7 +72,8 @@ public Set<String> getTags() {
public TreeVisitor<?, ExecutionContext> getVisitor() {
TreeVisitor<?, ExecutionContext> preconditions = Preconditions.and(
new UsesMethod<>(methodPattern, true),
Preconditions.not(new KotlinFileChecker<>()));
Preconditions.not(new KotlinFileChecker<>()),
Preconditions.not(new GroovyFileChecker<>()));
return Preconditions.check(preconditions, new JavaIsoVisitor<ExecutionContext>() {
private final MethodMatcher matcher = new MethodMatcher(methodPattern, true);
private final RemoveToStringVisitor removeToStringVisitor = new RemoveToStringVisitor();
Expand Down

0 comments on commit 6da3c7f

Please sign in to comment.