Skip to content

Commit 123172c

Browse files
committed
blacklist some methods
1 parent bccff94 commit 123172c

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

lombok.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config.stopBubbling = true
2+
3+
# Required for NullAway to work
4+
lombok.addLombokGeneratedAnnotation = true
5+
6+
# Copy JSpecify annotations to generated code (constructors, getters, setters)
7+
lombok.copyableAnnotations += org.jspecify.annotations.Nullable
8+
lombok.copyableAnnotations += org.jspecify.annotations.NonNull
9+
lombok.addNullAnnotations = jspecify

src/main/java/it/aboutbits/archunit/toolbox/ArchitectureTestBase.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ public abstract class ArchitectureTestBase {
2828
Set.of(
2929
// We should use `assertThatExceptionOfType(...).isThrownBy(...)` instead of `assertThatThrownBy(...)`
3030
"org.assertj.core.api.Assertions.assertThatThrownBy",
31+
"org.junit.jupiter.api.Assertions.assertThrows",
32+
"org.junit.jupiter.api.Assertions.assertDoesNotThrow",
33+
"org.junit.jupiter.api.Assertions.assertTrue",
34+
"org.junit.jupiter.api.Assertions.assertFalse",
35+
"org.junit.jupiter.api.Assertions.assertEquals",
36+
"org.junit.jupiter.api.Assertions.assertNotEquals",
37+
"org.junit.jupiter.api.Assertions.assertNull",
38+
"org.junit.jupiter.api.Assertions.assertNotNull",
39+
"org.junit.jupiter.api.Assertions.assertArrayEquals",
40+
"org.junit.jupiter.api.Assertions.assertIterableEquals",
41+
"org.junit.jupiter.api.Assertions.assertInstanceOf",
3142
// assertThat (allowed is only org.assertj.core.api.Assertions.assertThat)
3243
"org.assertj.core.api.AssertionsForClassTypes.assertThat",
3344
"org.assertj.core.api.AssertionsForClassTypes.assertThatCode",
@@ -508,11 +519,11 @@ public void check(JavaClass testClass, ConditionEvents events) {
508519

509520
/* ****************************************************************** */
510521

511-
private static String getTestClassSuffixRegex() {
522+
protected static String getTestClassSuffixRegex() {
512523
return "(" + String.join("|", TEST_CLASS_SUFFIXES) + ")$";
513524
}
514525

515-
private static String getTestClassRegex() {
526+
protected static String getTestClassRegex() {
516527
return ".+%s".formatted(getTestClassSuffixRegex());
517528
}
518529
}

0 commit comments

Comments
 (0)