Andrey S.
Andrey S.
Both this ```kotlin class Klass : Base("foo") ``` and this superclass constructor calls are indented correctly, in full accordance with [3.3. Indentation](https://github.com/saveourtool/diktat/blob/master/info/guide/diktat-coding-convention.md#-33-indentation): ```kotlin class Klass : Base("foo") ``` Now consider...
Consider I want to suppress certain warnings in the whole file: ```kotlin @file:Suppress( "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE", "TOP_LEVEL_ORDER") // False positives package com.example import java.lang.String // import ... //... ``` This immediately yields...
# Case 1 Currently, what the `TOP_LEVEL_ORDER` check reports, is outright unclear, giving the user no clue about how exactly the code should be changed to make _diKTat_ happy, except...
_DiKTat_ requires that `private` fields named `logger` are placed **before** constant values. The code below is correct: ```kotlin import java.util.logging.Logger object C { private val logger = Logger.getLogger("") const val...
Traditionally, _IDEA_ places all alias imports into a separate group which can't be removed:  On the contrary, _diKTat_ doesn't distinguish between regular and alias imports and requires that all...
Examples: ```kotlin private fun IndentedSourceCode.customConfig(): SortedMap = mapOf( EXTENDED_INDENT_AFTER_OPERATORS to extendedIndentAfterOperators, EXTENDED_INDENT_BEFORE_DOT to extendedIndentBeforeDot, EXTENDED_INDENT_FOR_EXPRESSION_BODIES to extendedIndentForExpressionBodies, EXTENDED_INDENT_OF_PARAMETERS to extendedIndentOfParameters, ).mapValues { (_, value) -> value.valueOrNull }.filterValues { value ->...
Minimal repro: ```kotlin class C { private val val0 = Regex("""\d+""") @Suppress("WRONG_NEWLINES") // Trailing comment private val val1 = 42 @Deprecated("Deprecation message") // Trailing comment private val val2 = ""...
## Minimal repro ```kotlin package com.example interface Interface { val state: Int } abstract class Primitive : Interface class Composite : Interface { private val primitives = emptyList() override val...
False-positives are reported for JUnit 5 test classes and methods annotated with `@ParameterizedTest` and/or `@Nested`: ```kotlin import org.junit.jupiter.api.Nested import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource class Test { @Nested inner class `Test group...
_DiKTat_ should require no `@return` tags in KDoc comments for expression-body functions with an implicit `Unit` or an explicit `Nothing` return types. In the below cases, a KDoc without any...