Lint’s STOPSHIP can save you from pushing your buggy code to production

Naveen T P
Feb 4, 2018 · 2 min read

Have you anytime come across the situation where you published your app to playstore and recalling the bug that you left unfixed?

If yes, then this article is for you.

Android Lint is one of the most important and powerful static analysis tool that we are not using to its fullest. We can customise lint in our build.gradle to avoid accidentally pushing the known bugs to production.

Add this code block in your app’s build.gradle file.

To avoid your unresolved buggy code not to hit production, just add the comment //STOPSHIP right in your codebase to fix the bug later.

And you are done!

At the time of building your app for playstore, If the lint finds out the comment in your codebase, it will break the build. So, You can go back to the code base, fix the known bug before publishing the app to production.

Lint will check the codebase during release build even if you are not running lint, as checkReleaseBuilds is by default true. There are about 42 user configurable lint fatal severities, STOPSHIP is one of those. You can go through each one of them, whichever suits your requirement you can implement it in your build.gradle.

If you liked the article, don’t shy away from giving claps. It will motivate me to write more articles like this. Happy coding!

Naveen T P

Written by

Android / iOS developer | Open source enthusiast |

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade