@SuppressWarnings and //noinspection doesn't work for my plugin

Answered

I developed a plugin with a local inspection. The local inspection in plugin.xml is:

<localInspection language="Apex"
    shortName="LoggerLogMethodNameInspection"
    displayName="LoggerLogMethodName"
    bundle="messages.SalesforceBundle"
    groupKey="inspections.group.name"
    enabledByDefault="true"
    level="WARNING"
    implementationClass="com.github.mikhailivanov.targetRecruitIdea.inspections.LoggerLogMethodNameInspection"/>

By default, it highlights properly. But when I try to suppress the highlighting with @SuppressWarnings or //noinspection it still highlights.

Any code change I should do? I don't analyze any "suppress" node in PSI in my plugin code. I expected it will be addressed by the IDE itself.

In the example below, you can see the 'anotherName' is still highlighted because of my inspection.

1 comment
Comment actions Permalink

Apex language must provide com.intellij.codeInspection.InspectionSuppressor implementation that handles such suppression comments/annotations or other markers in source code - they're language specific.

0

Please sign in to leave a comment.