Intellij inspection for implicit member visibility


#1

The Kotlin coding conventions for libraries says, “Always explicitly specify member visibility (to avoid accidentally exposing declarations as public API).” When working on a library, I would really like for my IDE to warn me about members that have been declared without an explicit visibility modifier. Does Intellij IDEA have such an inspection that I could enable? I searched the inspections menu for “api”, “library”, “visibility”, “public”, “modifier”, “explicit” and “implicit”, but found nothing.


#2

I don’t know of any inspection that would help. You could however create a feature request here for this. I’m pretty sure they just missed creating an inspection for this as it’s part of the official style guide .


#3

I filed that feature request some time ago as a KEEP here: https://github.com/Kotlin/KEEP/issues/45