Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lombok.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
config.stopBubbling = true

# Required for NullAway to work
lombok.addLombokGeneratedAnnotation = true

# Copy JSpecify annotations to generated code (constructors, getters, setters)
lombok.copyableAnnotations += org.jspecify.annotations.Nullable
lombok.copyableAnnotations += org.jspecify.annotations.NonNull
lombok.addNullAnnotations = jspecify
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ public abstract class ArchitectureTestBase {
Set.of(
// We should use `assertThatExceptionOfType(...).isThrownBy(...)` instead of `assertThatThrownBy(...)`
"org.assertj.core.api.Assertions.assertThatThrownBy",
"org.junit.jupiter.api.Assertions.assertThrows",
"org.junit.jupiter.api.Assertions.assertDoesNotThrow",
"org.junit.jupiter.api.Assertions.assertTrue",
"org.junit.jupiter.api.Assertions.assertFalse",
"org.junit.jupiter.api.Assertions.assertEquals",
"org.junit.jupiter.api.Assertions.assertNotEquals",
"org.junit.jupiter.api.Assertions.assertNull",
"org.junit.jupiter.api.Assertions.assertNotNull",
"org.junit.jupiter.api.Assertions.assertArrayEquals",
"org.junit.jupiter.api.Assertions.assertIterableEquals",
"org.junit.jupiter.api.Assertions.assertInstanceOf",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort these and add a comment that we blacklist the JUnit ones

// assertThat (allowed is only org.assertj.core.api.Assertions.assertThat)
"org.assertj.core.api.AssertionsForClassTypes.assertThat",
"org.assertj.core.api.AssertionsForClassTypes.assertThatCode",
Expand Down Expand Up @@ -508,11 +519,11 @@ public void check(JavaClass testClass, ConditionEvents events) {

/* ****************************************************************** */

private static String getTestClassSuffixRegex() {
protected static String getTestClassSuffixRegex() {
return "(" + String.join("|", TEST_CLASS_SUFFIXES) + ")$";
}

private static String getTestClassRegex() {
protected static String getTestClassRegex() {
return ".+%s".formatted(getTestClassSuffixRegex());
}
}