Search code examples
intellij-ideawarningssuppress-warningsintellij-14inspections

IDEA disable severity entry in code inspections


is there a way to disable a specified severities visibility for code inspection? The intention is that it is not shown in inspection summaries.

I think about a "do not show" warning like in Resharper? -> Resharper-DOC

Thanks

EDIT: I just don't want to see a specific severity in inspection summary. So let's say, I have 200 "Weak Warnings", 40 "Could be more performant" and 100 "INFO" entries. This could be done with 3 predifined severities. After inspection, as summary, I see the list of warnings grouped by this severities. My intention now is that I only want to see "Weak Warnings" and "Could be more performant", all warnings specified by the severity of "INFO" should not be shown in the result.

The goal here is not the non visibility in the IDEA GUI the further goal is that this entries are ignored in the IDEA offline Inspection, but if I can manage to change the Inspectionprofile in a way that some severities are completely ignored, in GUI, the resulting files from offline inspections will get more clear too.

Hopefully that's enough to explain my problem further.

EDIT:

Disabled for some testing

<inspection_tool class="Annotator" enabled="true" level="ERROR" enabled_by_default="true">
  <scope name="jmf.properties" level="WEAK WARNING" enabled="false" />
  <scope name="LicenseFiles" level="IGNORE" enabled="false" />
</inspection_tool>

Now LicenseFiles Scope is shown as "Weak Warning" although it's disabled, very interesting. The Scopes are the right ones, but it doesn't seem to work as it should.

The "Weak Warning" Severity shouldn't be listed here.

Scope Definition


Solution

  • Inspection profiles are stored as .xml files in the .idea directory for project-level profiles and in the settings directory for application-level profiles. You can create a copy of your inspection profile and do a batch search and replace of

    enabled="true" level="INFO"
    

    to

    enabled="false" level="INFO"
    

    (substituting your own severity if you need). This should do what you need.