Go to Settings/Preferences | Editor | Code Style | Kotlin.
Click Set from….
Select Kotlin style guide
Verify that your code follows the style guide
Go to Settings/Preferences | Editor | Inspections | Kotlin.
Open Kotlin | Style issues.
Switch on File is not formatted according to project settings inspection. Additional inspections that verify other issues described in the style guide (such as naming conventions) are enabled by default.