Is there some kind of linter that will warn if a c...
# announcements
b
Is there some kind of linter that will warn if a class is not annotated as public or internal? I know there's a KEEP somewhere about adding an explicit access mode to the compiler, but I don't think that's done yet.
2
j
I think it was teased as "library" mode. It would require return types to be declared too. Do want.
b
Same. Just went back to add internal to a bunch of constructors I missed only because I realized if I had done it earlier, an earlier change wouldn't have been breaking 😩
j
Want to file a YouTrack?
This is something that the compiler engineers at Google could potentially pick up / help with since we want this for all our Kotlin libraries.
b
j
thanks!
b
No prob!
Also wonder if this is something that could be contributed to detekt as a style rule in the meantime: https://arturbosch.github.io/detekt/style.html
There are already some visibility modifier and other rules aimed at lib authors that feel adjacent