github enofex/taikai v2.0.0
2.0.0

latest releases: v3.0.1, v3.0.0, v2.9.0...
one month ago

What's Changed

🎉 New Features

This release contains breaking changes. See the Migration Guide for every change with before/after examples.

✨ New

  • ClassCriteria, FieldCriteria and MethodCriteria select by name, annotation, type or package. Combine them with .and() / .or(); any ArchUnit predicate works too.
  • Taikai.Builder#excludeClasses(criteria) excludes classes from every rule.
  • New rules:
    • methodsShouldReturn / methodsShouldNotReturn
    • methodsShouldBeAnnotatedWithAll / methodsShouldNotBeAnnotatedWith
    • naming methodsShouldNotMatch / fieldsShouldNotMatch with criteria
    • …ForClass variants that select members by declaring class
  • ImportsConfigurer and NamingConfigurer can be disabled.

💥 Breaking changes

  • Rules that selected with a String regex now take criteria, for example ClassCriteria.nameMatching(".*Dto").
  • classesShouldBeAssignableTo / classesShouldImplement used a simple-name suffix. Use ClassCriteria.simpleNameMatching(".*Suffix").
  • Removed the …AnnotatedWith…, classesAssignableTo… and classesImplementing… variants. Use the general rule with criteria.
  • Removed deprecated methods, and renamed quarkus.ai.namesShouldEndWithAssistantOrResource to …OrService.
  • classesShouldUseLogger takes the classes first, and ImportPatterns returns criteria.
  • Configurers and TaikaiException are final, and the nested configurers' constructors are no longer public.

🐛 Behaviour changes and fixes

  • annotatedWith criteria also match meta-annotations, and assignableTo excludes the type itself.
  • shouldBeAnnotatedWithRepository() skips interfaces.
  • Rules ignore compiler-generated members, and rule descriptions match what they check.
  • toBuilder() no longer shares excluded classes and rules with the original.

New Contributors

Full Changelog: v1.69.0...v2.0.0

Don't miss a new taikai release

NewReleases is sending notifications on new releases.