New feature, improvement proposal
Add rewrite support for errorprone.refasterrules
I’d like to propose integrating Google’s Error Prone and its Picnic extension (demonstrated in Automating Away Bugs with Error Prone | PlatformCon 2023) to enable automated bug fixes via rewrite rules. This would complement Checkstyle’s static analysis capabilities by addressing semantic bugs rather than stylistic issues.
Motivation
Error Prone’s refaster/rewrite rules can automatically:
- Fix common bug patterns (e.g.,
String.equals() misuse)
- Modernize code (e.g., JDK migration helpers)
- Enforce best practices (e.g., null-check improvements)
Real-world adoptions show tangible benefits:
Proposal
- Add support for
errorprone.refasterrules-based rewrites
- Implement with opt-in adoption (no breaking changes)
- Include suppression mechanisms for API constraints
Discussion Points
- Need consensus on:
- Scope of auto-fixes
- Preferred suppression strategy
- Integration approach
Next Steps
I’m happy to:
- Prepare a PoC demonstrating the value
- Collaborate on implementation strategy
- Address any concerns about compatibility
New feature, improvement proposal
Add
rewritesupport forerrorprone.refasterrulesI’d like to propose integrating Google’s Error Prone and its Picnic extension (demonstrated in Automating Away Bugs with Error Prone | PlatformCon 2023) to enable automated bug fixes via
rewriterules. This would complement Checkstyle’s static analysis capabilities by addressing semantic bugs rather than stylistic issues.Motivation
Error Prone’s
refaster/rewriterules can automatically:String.equals()misuse)Real-world adoptions show tangible benefits:
rewritesupport forerrorprone.refasterrulescheckstyle/checkstyle#17490Proposal
errorprone.refasterrules-based rewritesDiscussion Points
Next Steps
I’m happy to: