Test local inspections on the fly via highlighting

Fixes problem with INFORMATION highlight type in batch mode (IDEA 181).
It's no more required to report INFORMATIONs in unit tests in batch.
This commit is contained in:
Mikhail Glukhikh
2018-04-17 20:11:23 +03:00
parent b6661710dd
commit ef3ba5f0b1
11 changed files with 122 additions and 112 deletions
@@ -66,8 +66,7 @@ abstract class AbstractKotlinInspection: LocalInspectionTool(), CustomSuppressab
range: TextRange?,
vararg fixes: LocalQuickFix
) {
if (!ApplicationManager.getApplication().isUnitTestMode &&
!isOnTheFly && highlightType == ProblemHighlightType.INFORMATION) return
if (!isOnTheFly && highlightType == ProblemHighlightType.INFORMATION) return
val problemDescriptor = manager.createProblemDescriptor(element, range, description, highlightType, isOnTheFly, *fixes)
registerProblem(problemDescriptor)
}