diff --git a/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt b/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt index b556d4c8bab9..d4d326044eed 100644 --- a/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt +++ b/platform/inspect/src/com/intellij/codeInspection/inspectionProfile/InspectionCategoryGroupProvider.kt @@ -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.escapeToolGroupPath(): List { + return map { escapeToolGroupPathElement(it) } +} + +private fun escapeToolGroupPathElement(path: String): String { + return path + .replace("""\""", """\\""") + .replace("""/""", """\/""") } \ No newline at end of file