Skip to content

Commit

Permalink
Rename check
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 authored and rickie committed Dec 18, 2023
1 parent c632892 commit 231b5b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@
@AutoService(BugChecker.class)
@BugPattern(
summary = "Refaster template parameters should be listed in a canonical order",
link = BUG_PATTERNS_BASE_URL + "RefasterParameterOrder",
link = BUG_PATTERNS_BASE_URL + "RefasterMethodParameterOrder",
linkType = CUSTOM,
severity = SUGGESTION,
tags = STYLE)
public final class RefasterParameterOrder extends BugChecker implements ClassTreeMatcher {
public final class RefasterMethodParameterOrder extends BugChecker implements ClassTreeMatcher {
private static final long serialVersionUID = 1L;
private static final Matcher<Tree> BEFORE_TEMPLATE_METHOD = hasAnnotation(BeforeTemplate.class);
private static final Matcher<Tree> BEFORE_OR_AFTER_TEMPLATE_METHOD =
anyOf(BEFORE_TEMPLATE_METHOD, hasAnnotation(AfterTemplate.class));

/** Instantiates a new {@link RefasterParameterOrder} instance. */
public RefasterParameterOrder() {}
/** Instantiates a new {@link RefasterMethodParameterOrder} instance. */
public RefasterMethodParameterOrder() {}

@Override
public Description matchClass(ClassTree tree, VisitorState state) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import com.google.errorprone.CompilationTestHelper;
import org.junit.jupiter.api.Test;

final class RefasterParameterOrderTest {
final class RefasterMethodParameterOrderTest {
@Test
void identification() {
CompilationTestHelper.newInstance(RefasterParameterOrder.class, getClass())
CompilationTestHelper.newInstance(RefasterMethodParameterOrder.class, getClass())
.addSourceLines(
"A.java",
"import static com.google.errorprone.refaster.ImportPolicy.STATIC_IMPORT_ALWAYS;",
Expand Down Expand Up @@ -45,7 +45,7 @@ void identification() {

@Test
void replacement() {
BugCheckerRefactoringTestHelper.newInstance(RefasterParameterOrder.class, getClass())
BugCheckerRefactoringTestHelper.newInstance(RefasterMethodParameterOrder.class, getClass())
.addInputLines(
"A.java",
"import com.google.errorprone.refaster.annotation.AfterTemplate;",
Expand Down

0 comments on commit 231b5b5

Please sign in to comment.