From 7f80c939ac67f2ab04fb8de95943cb1dbccd87d7 Mon Sep 17 00:00:00 2001 From: Nariman Abdullin Date: Thu, 16 Jun 2022 14:11:31 +0300 Subject: [PATCH] fixed UNUSED_IMPORT in project --- .../diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt | 5 ++--- .../chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt | 1 - .../org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt index bdedc76de3..f175b196fd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt @@ -6,7 +6,6 @@ import org.cqfn.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule import org.cqfn.diktat.util.LintTestBase import com.pinterest.ktlint.core.LintError -import generated.WarningNames import generated.WarningNames.AVOID_NESTED_FUNCTIONS import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -76,9 +75,9 @@ class AvoidNestedFunctionsWarnTest : LintTestBase(::AvoidNestedFunctionsRule) { """ |class SomeClass { | fun someFunc() {} - | + | | fun anotherFunc() {} - | + | | fun moreFunction() {} |} """.trimMargin() diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt index 7c05cbf9a8..3c8b288814 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt @@ -4,7 +4,6 @@ import org.cqfn.diktat.common.config.rules.RulesConfig import org.cqfn.diktat.ruleset.constants.Warnings import org.cqfn.diktat.ruleset.rules.DIKTAT_RULE_SET_ID import org.cqfn.diktat.ruleset.rules.chapter5.ParameterNameInOuterLambdaRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule import org.cqfn.diktat.util.LintTestBase import com.pinterest.ktlint.core.LintError diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt index f8897e7bd9..5a89060d28 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt @@ -14,7 +14,6 @@ import com.pinterest.ktlint.core.Rule import com.pinterest.ktlint.core.RuleSet import com.pinterest.ktlint.core.api.FeatureInAlphaState import com.pinterest.ktlint.core.ast.ElementType -import com.pinterest.ktlint.core.ast.ElementType.BLOCK import com.pinterest.ktlint.core.ast.ElementType.CLASS import com.pinterest.ktlint.core.ast.ElementType.CLASS_BODY import com.pinterest.ktlint.core.ast.ElementType.EOL_COMMENT @@ -23,7 +22,6 @@ import com.pinterest.ktlint.core.ast.ElementType.FILE import com.pinterest.ktlint.core.ast.ElementType.FUN import com.pinterest.ktlint.core.ast.ElementType.IDENTIFIER import com.pinterest.ktlint.core.ast.ElementType.INTEGER_CONSTANT -import com.pinterest.ktlint.core.ast.ElementType.LAMBDA_EXPRESSION import com.pinterest.ktlint.core.ast.ElementType.MODIFIER_LIST import com.pinterest.ktlint.core.ast.ElementType.PROPERTY import com.pinterest.ktlint.core.ast.ElementType.TYPE_REFERENCE @@ -129,7 +127,7 @@ class AstNodeUtilsTest { fun `test getTypeParameterList`() { val code = """ class Array(val size: Int) { - + } """.trimIndent() applyToCode(code, 1) { node, counter -> @@ -408,7 +406,7 @@ class AstNodeUtilsTest { fun `test isNodeFromFileLevel - node isn't from file level`() { val code = """ val x = 2 - + """.trimIndent() applyToCode(code, 8) { node, counter -> if (node.elementType != FILE) {