mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
QD-4986 Escape "/" symbol in group names with "\"
GitOrigin-RevId: 7c1c230a6b89e92f630f547eb4299245d1d9e1df
This commit is contained in:
committed by
intellij-monorepo-bot
parent
df9a76bca0
commit
1e7b391201
@@ -16,7 +16,7 @@ class InspectionCategoryGroupProvider : InspectionGroupProvider {
|
||||
|
||||
override fun includesInspection(tool: InspectionToolWrapper<*, *>): Boolean {
|
||||
return try {
|
||||
tool.groupPath.joinToString("/").startsWith(category)
|
||||
tool.groupPath.escapeToolGroupPath().joinToString("/").startsWith(category)
|
||||
}
|
||||
catch (e: AssertionError) {
|
||||
false
|
||||
@@ -24,4 +24,14 @@ class InspectionCategoryGroupProvider : InspectionGroupProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Array<String>.escapeToolGroupPath(): List<String> {
|
||||
return map { escapeToolGroupPathElement(it) }
|
||||
}
|
||||
|
||||
private fun escapeToolGroupPathElement(path: String): String {
|
||||
return path
|
||||
.replace("""\""", """\\""")
|
||||
.replace("""/""", """\/""")
|
||||
}
|
||||
Reference in New Issue
Block a user