Skip to content

uzilan/Suppressenator

Repository files navigation

Suppressenator

This repository contains a Kotlin notebook file which you can use to find all the @Suppress and @SuppressWarning annotations in your code.

Why?

Because if you're using a static code analyzer like Detekt, you might realize that you tend to find some of the rules cumbersome and ignore them often by adding @Suppress annotations in your code. This might be an indicator that some of the rules are wrong for your project and need to be adjusted. This tool allows you to find which @Suppress annotations are mostly used, and thus point to the rules that need adjustment.

How?

  1. Install the Kotlin notebook plugin in you Intellij
  2. Copy the suppressenator.ipynb file from this repository and put it in your own repository
  3. Adjust the rootDirectory to match the root of your code
  4. Press the Run All button on the top of the notebook
  5. Voila! The notebook will attempt to find all your @Suppress and @SuppressWarning annotations and visualise them at the bottom.

Using the Suppressenator with the example repository gives the following image:

example.png

As you can see, we suppress way too many UnusedPrivateMembers.

But @Suppress annotations are bad! Nobody should use them!

Oh, really? How about Arrow? arrow.png

Or Exposed? exposed.png

Or Detekt? detekt.png

Or, finally, Kotlin? kotlin.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published