Implementation of Auto-fix recipes
Checkstyle plays an important role in maintaining code quality in Java projects, but many of its reported violations are small, repetitive issues that developers tend to overlook. Although these problems are easy to fix, the effort required to manually locate and resolve each one discourages developers from addressing them, resulting in inconsistent code quality and growing technical debt. This project focuses on reducing that manual overhead by extending Checkstyle’s auto-fix capabilities using OpenRewrite. The main objective is to develop auto-fix recipes targeting frequently occurring Checkstyle violations. These recipes will automatically apply safe and consistent transformations to the codebase, allowing developers to resolve issues quickly and at scale. Beyond adding new recipes, the project will improve the internal design of the auto-fix system by transitioning from a position-based approach to a marker-based approach. The current method relies heavily on fixed code positions, which can become unreliable when the code structure changes. A marker-based strategy, on the other hand, enables more stable and context-aware transformations, making the system easier to maintain and extend. All implemented recipes will follow consistent design principles, include proper test coverage, and be validated on real-world open-source projects to ensure their correctness and effectiveness in practical scenarios. Overall, this project aims to streamline the process of fixing style violations, improve developer efficiency, and strengthen Checkstyle’s ecosystem by making automated code corrections more reliable and scalable.
Project details
Technologies
Not listed in the archive