diff --git a/ij/common/src/main/kotlin/org/jetbrains/academy/test/system/ij/formatting/FormattingUtil.kt b/ij/common/src/main/kotlin/org/jetbrains/academy/test/system/ij/formatting/FormattingUtil.kt index c5027b7..9b77dd1 100644 --- a/ij/common/src/main/kotlin/org/jetbrains/academy/test/system/ij/formatting/FormattingUtil.kt +++ b/ij/common/src/main/kotlin/org/jetbrains/academy/test/system/ij/formatting/FormattingUtil.kt @@ -6,8 +6,6 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.command.WriteCommandAction import com.intellij.psi.PsiFile import com.intellij.psi.codeStyle.CodeStyleManager -import org.jetbrains.academy.test.system.inspections.applyInspections -import org.jetbrains.kotlin.idea.inspections.KotlinUnusedImportInspection import org.junit.jupiter.api.Assertions // TODO: make it possible to check different aspects of formatting @@ -32,10 +30,3 @@ fun PsiFile.formatting(): String? { } return ApplicationManager.getApplication().runReadAction { text } } - -fun PsiFile.checkIfOptimizeImportsWereApplied() { - Assertions.assertTrue( - applyInspections(listOf(KotlinUnusedImportInspection())).isEmpty(), - "Please, apply \"Optimize import\" option when formatting code." - ) -}