From bf796a4166d2adbcdb1abd7b04255247de9d8d2f Mon Sep 17 00:00:00 2001 From: maxxedev <5051664+maxxedev@users.noreply.github.com> Date: Mon, 8 May 2023 00:48:22 -0700 Subject: [PATCH] exclude junit5's @RegisterExtension from unused variable check --- .../java/com/google/errorprone/bugpatterns/UnusedVariable.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java b/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java index d5740870ee7..dfca701c37f 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/UnusedVariable.java @@ -137,6 +137,7 @@ public final class UnusedVariable extends BugChecker implements CompilationUnitT "javax.persistence.Version", "javax.xml.bind.annotation.XmlElement", "org.junit.Rule", + "org.junit.jupiter.api.extension.RegisterExtension", "org.openqa.selenium.support.FindAll", "org.openqa.selenium.support.FindBy", "org.openqa.selenium.support.FindBys",