saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
521 stars 39 forks source link

[FILE_NAME_INCORRECT] suggestion for improvement #1747

Open Cheshiriks opened 11 months ago

Cheshiriks commented 11 months ago

If the file contains only one Interface or enum class, then it will not have a .kt in the name. Maybe add this to the rule?

nulls commented 11 months ago

can you please provide example? I didn't get...

Cheshiriks commented 11 months ago

@nulls I am receiving this message in my save cloud

Снимок
nulls commented 11 months ago

It's another issue: it's about prefix I. We do not support it and diktat tries to change it to IbaseMetrics. So need to add two suppressions: @file:Suppress("FILE_NAME_INCORRECT") and @Suppress("CLASS_NAME_INCORRECT")

But probably we should support prefix I which is the common (but from C# world) prefix for interface