OkCupid Brian Plummer May 18, 2020

Find and Fix Issues with Android Studio Static Code Analysis

Article Summary

Brian Plummer from OkCupid reveals how their team uses Android Studio's built-in static analysis to systematically improve code quality. But running the tool is the easy part—merging those changes without breaking production is where most teams fail.

Android Studio includes powerful static code analysis that can catch everything from internationalization issues to visibility problems. The OkCupid engineering team shares their battle-tested process for finding issues at scale and actually shipping the fixes without introducing bugs or overwhelming code reviewers.

Key Takeaways

Critical Insight

Static analysis finds the issues, but strategic batching, timing, and communication turn those findings into merged improvements instead of abandoned PRs.

The article reveals why treating code cleanup as a 'choose your own adventure' actually makes developers better at code review.

About This Article

Problem

Android Studio's static code analysis tool produces a lot of inspection results. They're split across Android, Kotlin, Java, and XML categories, which makes it hard for developers to figure out which violations matter most and how to fix them in a logical order.

Solution

Brian Plummer's team took a straightforward approach. They assessed the risk level of each issue, grouped similar changes into single commits, ran thorough tests, and wrote clear pull request descriptions before merging anything.

Impact

The OkCupid engineers used these practices to turn static analysis findings into real code improvements. They didn't introduce bugs, kept their productivity up, and made sure code reviewers stayed engaged while they refactored.