diff --git a/src/main/java/com/enofex/taikai/java/JavaConfigurer.java b/src/main/java/com/enofex/taikai/java/JavaConfigurer.java index 5906934..89e2e1b 100644 --- a/src/main/java/com/enofex/taikai/java/JavaConfigurer.java +++ b/src/main/java/com/enofex/taikai/java/JavaConfigurer.java @@ -75,7 +75,9 @@ public JavaConfigurer classesShouldResideInPackage(String regex, String packageI Configuration configuration) { return addRule(TaikaiRule.of(classes() .that().haveNameMatching(regex) - .should().resideInAPackage(packageIdentifier), configuration)); + .should().resideInAPackage(packageIdentifier) + .as("Classes have name matching %s should reside in package %s".formatted( + regex, packageIdentifier)), configuration)); } public JavaConfigurer classesShouldResideOutsidePackage(String regex, String packageIdentifier) { @@ -86,7 +88,9 @@ public JavaConfigurer classesShouldResideOutsidePackage(String regex, String pac Configuration configuration) { return addRule(TaikaiRule.of(classes() .that().haveNameMatching(regex) - .should().resideOutsideOfPackage(packageIdentifier), configuration)); + .should().resideOutsideOfPackage(packageIdentifier) + .as("Classes have name matching %s should reside outside package %s".formatted( + regex, packageIdentifier)), configuration)); } public JavaConfigurer classesShouldBeAnnotatedWith(String regex,