Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules checking annotated with should reside in and outside package mi… #75

Merged
Changes from all commits
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
8 changes: 6 additions & 2 deletions src/main/java/com/enofex/taikai/java/JavaConfigurer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
Expand Down
Loading