From be6d1d992382353e61e97602df59f8f59e330c2c Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 13 May 2024 09:30:46 +0200 Subject: [PATCH] IJPL-149476 fix unresovled PyBundle GitOrigin-RevId: c9997d7f1eb5fb96b1b0f005f852cdf58406b189 --- .../src/intellij.commandInterface.xml | 6 +-- .../extractor/InspectopediaExtractor.kt | 37 +++++++++++-------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/commandInterface/src/intellij.commandInterface.xml b/commandInterface/src/intellij.commandInterface.xml index 17c3b8f35185..fabc2a836e24 100644 --- a/commandInterface/src/intellij.commandInterface.xml +++ b/commandInterface/src/intellij.commandInterface.xml @@ -1,15 +1,13 @@ - - + + - - 1) HtmlUtils.cleanupHtml(description[1], language) else null, - path = wrapper.groupPath.asList(), - isAppliesToDialects = wrapper.applyToDialects(), - isCleanup = wrapper.isCleanupTool, - isEnabledDefault = wrapper.isEnabledByDefault, - options = panelInfo, - cweIds = inspectionExtraState.inspections.get(wrapper.id)?.cweIds, - )) + try { + val language = wrapper.language + availablePlugins.get(pluginId)!!.inspections.add(Inspection( + id = wrapper.shortName, + name = wrapper.displayName, + severity = wrapper.defaultLevel.name, + language = language, + briefDescription = description.firstOrNull()?.let { HtmlUtils.cleanupHtml(it, language) }, + extendedDescription = if (description.size > 1) HtmlUtils.cleanupHtml(description[1], language) else null, + path = wrapper.groupPath.asList(), + isAppliesToDialects = wrapper.applyToDialects(), + isCleanup = wrapper.isCleanupTool, + isEnabledDefault = wrapper.isEnabledByDefault, + options = panelInfo, + cweIds = inspectionExtraState.inspections.get(wrapper.id)?.cweIds, + )) + } + catch (e: Throwable) { + System.err.println("Error while processing ${wrapper.extension}") + e.printStackTrace() + exitProcess(-1) + } } val sortedPlugins = availablePlugins.values