Adevinta Germany Dec 5, 2016

Checkstyle on Changed Files with Gradle

Article Summary

Marc Prengemann from mobile.de faced 30,000+ Checkstyle violations in their Android codebase. Instead of grinding to a halt, his team found a smarter way forward.

The mobile.de Android team integrated Checkstyle into their PR review process but discovered their legacy codebase had tens of thousands of existing violations. Rather than attempting a massive cleanup, they built a custom Gradle task to check only modified files in pull requests, enabling incremental improvement without blocking development.

Key Takeaways

Critical Insight

A custom Gradle task that runs Checkstyle only on PR changes lets teams enforce coding standards on new code while tackling legacy violations incrementally.

The article includes the full Gradle implementation with Git integration that you can drop into your own Android project today.

Recent from Adevinta Germany

Related Articles