Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Aug 11, 2023
1 parent d071681 commit 7d8818a
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 @@ -227,7 +227,7 @@ void replacement() {
@Test
void ignoreClassesAnnotatedWithLombokData() {
BugCheckerRefactoringTestHelper.newInstance(DirectReturn.class, getClass())
.addInputLines("Data.java", "package lombok;", "public @interface Data {}")
.addInputLines("Data.java", "package lombok;", "", "public @interface Data {}")
.expectUnchanged()
.addInputLines(
"A.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void hasMetaAnnotation() {
@Test
void hasLombokDataAnnotation() {
CompilationTestHelper.newInstance(LombokDataAnnotationMatcher.class, getClass())
.addSourceLines("Data.java", "package lombok;", "public @interface Data {}")
.addSourceLines("Data.java", "package lombok;", "", "public @interface Data {}")
.addSourceLines(
"A.java",
"import lombok.Data;",
Expand All @@ -63,17 +63,17 @@ void hasLombokDataAnnotation() {
"public class A {",
" private String field;",
"",
" static class B { }",
" static class B {}",
"",
" @Data",
" // BUG: Diagnostic contains:",
" static class C { }",
" static class C {}",
"}")
.addSourceLines("D.java", "import lombok.Data;", "", "public class D { }")
.addSourceLines("D.java", "public class D {}")
.doTest();
}

/** A {@link BugChecker} that delegates to {@link MoreMatchers#hasMetaAnnotation(String)} . */
/** A {@link BugChecker} that delegates to {@link MoreMatchers#hasMetaAnnotation(String)}. */
@BugPattern(summary = "Interacts with `MoreMatchers` for testing purposes", severity = ERROR)
public static final class TestTemplateMatcher extends BugChecker
implements AnnotationTreeMatcher {
Expand All @@ -87,7 +87,7 @@ public Description matchAnnotation(AnnotationTree tree, VisitorState state) {
}
}

/** A {@link BugChecker} that delegates to {@link MoreMatchers#HAS_LOMBOK_DATA} . */
/** A {@link BugChecker} that delegates to {@link MoreMatchers#HAS_LOMBOK_DATA}. */
@BugPattern(summary = "Interacts with `MoreMatchers` for testing purposes", severity = ERROR)
public static final class LombokDataAnnotationMatcher extends BugChecker
implements ClassTreeMatcher {
Expand Down

0 comments on commit 7d8818a

Please sign in to comment.