Intellij inspection for implicit member visibility

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.

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 .

I filed that feature request some time ago as a KEEP here: Explicit mode for library authoring · Issue #45 · Kotlin/KEEP · GitHub