File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
kotlin/com/github/tempest/framework/views Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.github.tempest.framework.views
2+
3+ import com.github.tempest.framework.TempestFrameworkUtil
4+ import com.intellij.codeInspection.XmlInspectionSuppressor
5+ import com.intellij.psi.PsiElement
6+ import com.intellij.psi.html.HtmlTag
7+ import com.intellij.psi.util.elementType
8+ import com.intellij.psi.xml.XmlTokenType
9+
10+ class TempestComponentsInspectionSuppressor : XmlInspectionSuppressor () {
11+ override fun isSuppressedFor (element : PsiElement , toolId : String ) = when {
12+ element.elementType == XmlTokenType .XML_NAME -> isTagSuppressed(element.text, toolId)
13+ element is HtmlTag -> isTagSuppressed(element.name, toolId)
14+ else -> false
15+ }
16+
17+ private fun isTagSuppressed (tagName : String , toolId : String ): Boolean {
18+ return tagName.startsWith(TempestFrameworkUtil .COMPONENT_NAME_PREFIX )
19+ && toolId in listOf (" HtmlUnknownTag" , " CheckEmptyScriptTag" )
20+ }
21+ }
Original file line number Diff line number Diff line change 2222 implementation =" com.github.tempest.framework.views.references.ComponentReferenceContributor" />
2323 <spellchecker .bundledDictionaryProvider
2424 implementation =" com.github.tempest.framework.SpellcheckingDictionaryProvider" />
25+ <lang .inspectionSuppressor
26+ language =" HTML"
27+ implementationClass =" com.github.tempest.framework.views.TempestComponentsInspectionSuppressor" />
2528 </extensions >
2629 <extensions defaultExtensionNs =" com.jetbrains.php" >
2730
You can’t perform that action at this time.
0 commit comments