Fix inspections run for script dependency source files in come cases

This filter defines which files inspections are run for
In most cases other platform code prevented inspections from running for
    library source files but this check is needed to prevent KT-19377

 #KT-19377 Fixed
This commit is contained in:
Pavel V. Talanov
2017-09-05 20:28:39 +03:00
parent 6b14d15374
commit 6bec17246c
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.idea.KotlinFileType
class KotlinProblemHighlightFilter : ProblemHighlightFilter() {
override fun shouldHighlight(psiFile: PsiFile): Boolean {
if (psiFile.fileType == KotlinFileType.INSTANCE && !KotlinHighlightingUtil.shouldHighlight(psiFile)) return false
if (psiFile.fileType == KotlinFileType.INSTANCE && !KotlinHighlightingUtil.shouldHighlightErrors(psiFile)) return false
return true
}