Any inspection/tip for finding all class properties that can be made private?


#1

I have lot of classes with lot of public vals/vars. Is there any simplified way to find them all? Regex way is no help since local variables declaration syntax is identical to properties. I would expect kotlin inspections included in idea to have this one. There is quick fix for “Property is never used” but “Property can be made local var”/“Property can be made private” is missing.


#2

“Property can be local var” is implemented and should work. “Declaration can be private” is indeed not implemented; you’re welcome to file a feature request in YouTrack.


#3

Nope: