Problem description:
We are developing an IntelliJ plugin that uses LocalInspectionTool to report security vulnerabilities detected by an external scanner. The inspection works correctly for most file types (.json, .java, .py, .cs), but for Shell Script (.sh) files, the ProblemDescriptor objects are not displayed in the Problems window or as hover tooltips when the plugin is installed from a zip file.
What Works:
-
Vulnerabilities are correctly detected in .shfiles -
Lines are highlighted in the editor (via custom MarkupModel.addRangeHighlighter()) -
Gutter icons appear in the left margin (via custom GutterIconRenderer) -
Our checkFile()method returns validProblemDescriptor[](confirmed via logging) -
Everything works correctly when running the plugin via runIdeGradle task
What Doesn’t Work (only for .sh files):
-
Problems Window shows no entries -
Hover tooltips don’t appear when hovering over highlighted lines
Critical Finding:
The issue occurs only when the plugin is installed from a zip file, not when running via runIde. This happens regardless of IDE version:
Technical Details:
Our inspection extends LocalInspectionTool and is registered in plugin.xml as: <<localInspection implementationClass="com.checkmarx.intellij.devassist.inspection.CxOneAssistInspection" displayName="Checkmarx One Assist" groupName="Checkmarx" shortName="CxOneAssist" enabledByDefault="true"/>
We create ProblemDescriptor using:
InspectionManager.createProblemDescriptor(
psiFile, // PsiFile (ShFile for .sh files)
textRange, // TextRange for the problem line
description, // HTML description
ProblemHighlightType.GENERIC_ERROR,
isOnTheFly,
localQuickFixes
);
What We’ve Tried (All Failed):
-
Using PsiElementinstead ofPsiFilewith relativeTextRange -
Adding level="WARNING"andrunForWholeFile="true"to inspection registration -
Verified PsiFileinstance consistency (same instance used throughout) -
Confirmed PsiFile.isValid()returnstrue -
Verified Shell Script plugin is installed and enabled
Debug Logging Confirms:
RTS-DEBUG: File: deploy.sh, PsiFile class: com.intellij.sh.psi.ShFile, TextRange: (0,53), HighlightType: GENERIC_ERROR
RTS-DEBUG: Returning 9 problem descriptors for file: deploy.sh
The ProblemDescriptor objects are valid and being returned, but IntelliJ’s inspection framework is not displaying them.
Steps to reproduce:
-
Create an IntelliJ plugin with a
LocalInspectionToolimplementation -
In
checkFile(), returnProblemDescriptor[]for.shfiles usingInspectionManager.createProblemDescriptor(psiFile, textRange, ...) -
Build the plugin using
./gradlew buildPlugin -
Install the plugin from the zip file (Settings → Plugins →
→ Install Plugin from Disk) -
Open a
.shfile that triggers the inspection -
Observe that:
-
The Problems window is empty (no entries for
.shfile) -
Hover tooltips don’t appear
-
-
Compare with
./gradlew runIdewhere everything works correctly
Environment:
-
Product: IntelliJ IDEA Community Edition & PyCharm Professional
-
Product Versions Tested:
-
IntelliJ IDEA 2022.2.1 (Community Edition)
-
PyCharm 2025.2.0.1
-
-
Operating System: Windows 11
-
Plugin Build Configuration:
-
org.jetbrains.intellijplugin version: 1.17.4 -
Target IntelliJ version: 2022.2.1
-
Java sourceCompatibility: 11 (also tested with 17)
-
-
Shell Script Plugin: Installed and enabled
-
Plugin Dependencies: Only
com.intellij.modules.platform
Question
- Is there a known issue with
LocalInspectionTooland Shell Script files that causesProblemDescriptorobjects to not be displayed in the Problems window when the plugin is zip-installed? Is there a different approach we should use for Shell Script files, such asExternalAnnotator?

