diktat
diktat copied to clipboard
Improve the reporting of `WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES` check
DiKTat requires that private
fields named logger
are placed before constant values. The code below is correct:
import java.util.logging.Logger
object C {
private val logger = Logger.getLogger("")
const val CONST0 = "This is a constant"
val val0 = Logger.getLogger("")
val val1 = Logger.getLogger("")
}
There're two issues with the above, though:
- This behaviour is not documented.
- Error reporting could be improved.
Environment information
- diktat version: 1.2.3