Introduce action to add missing when branches on sealed class
Made via diagnostics NON_EXHAUSTIVE_WHEN_FOR_SEALED_CLASS with INFO severity and quick-fix So #KT-17580 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
1072495001
commit
e30b9758f4
@@ -250,7 +250,7 @@ private class ElementAnnotator(private val element: PsiElement,
|
||||
}
|
||||
)
|
||||
}
|
||||
Severity.INFO -> return // Do nothing
|
||||
Severity.INFO -> AnnotationPresentationInfo(ranges, highlightType = ProblemHighlightType.INFORMATION)
|
||||
}
|
||||
|
||||
setUpAnnotations(diagnostics, presentationInfo)
|
||||
@@ -298,7 +298,7 @@ private class AnnotationPresentationInfo(
|
||||
holder.createWarningAnnotation(range, defaultMessage)
|
||||
}
|
||||
}
|
||||
else -> throw IllegalArgumentException("Only ERROR and WARNING diagnostics are supported")
|
||||
Severity.INFO -> holder.createInfoAnnotation(range, defaultMessage)
|
||||
}
|
||||
|
||||
annotation.tooltip = getMessage(diagnostic)
|
||||
|
||||
Reference in New Issue
Block a user