rewrite-static-analysis
rewrite-static-analysis copied to clipboard
Enhance FinalClass with new exclusion options and includeNeverExtended option
What's changed?
- Added
includeNeverExtendedoption that allows to finalize classes that are never extended in the codebase - Added
excludePackagesoption for package pattern exclusions (e.g.,com.example.api.*) - Added
excludeAnnotationsoption to exclude classes with specified annotations (annotations like:@Deprecated,Deprecated,@java.lang.Deprecated) - Fixed inheritance chain bug
What's your motivation?
- Following up on https://github.com/openrewrite/rewrite-static-analysis/pull/646#issuecomment-3218095322
- Covering as well: https://github.com/openrewrite/rewrite-static-analysis/issues/729
@timtebeek - FYI.
Checklist
- [x] I've added unit tests to cover both positive and negative cases
- [x] I've read and applied the recipe conventions and best practices
- [x] I've used the IntelliJ IDEA auto-formatter on affected files