0

I want to import an inspection profile to my IntelliJ IDEA project. I have tried the following: click on the inspector icon (down-right corner of the window) -> configure inspections -> import -> [select the profile XML file] -> OK. After doing so, no error message appears and it looks like, indeed, everything went OK. But when I look again at the list of available inspection profiles, the recently imported profile is not available.

Am I doing something wrong? Is there any known bug about this issue?

This is what the file contains:

<?xml version="1.0" encoding="UTF-8"?>
<inspections version="1.0" is_locked="false">
  <option name="myName" value="Heavier Inspection" />
  <option name="myLocal" value="false" />
  <inspection_tool class="JavadocReference" enabled="true" level="WARNING" enabled_by_default="true" />
  <inspection_tool class="MissingClassJavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
    <option name="methodDetectionLevel" value="private" />
    <option name="checkAnonymousClasses" value="true" />
    <option name="useSingleLineReferences" value="true" />
  </inspection_tool>
  <inspection_tool class="MissingFieldJavaDoc" enabled="true" level="WARNING" enabled_by_default="true" />
  <inspection_tool class="MissingMethodJavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
    <option name="methodDetectionLevel" value="private" />
    <option name="checkAnonymousClasses" value="true" />
    <option name="useSingleLineReferences" value="true" />
  </inspection_tool>
  <inspection_tool class="RedundantSuppression" enabled="true" level="WARNING" enabled_by_default="true" />
  <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
    <option name="processCode" value="true" />
    <option name="processLiterals" value="true" />
    <option name="processComments" value="true" />
  </inspection_tool>
  <inspection_tool class="TodoComment" enabled="true" level="WARNING" enabled_by_default="true" />
</inspections>
Josep
  • 495
  • 2
  • 6
  • 16

1 Answers1

0

You could copy/paste your XML file in <your project path>/.idea/inspectionProfiles/, then it should be available in the settings dialog to make it the default profile.

Bastien Jansen
  • 8,756
  • 2
  • 35
  • 53
  • It hasn't worked. Not only the inspection profile is not in the list, but now an error message appears when I attempt to create a new profile. The message says "Could not save project: null". – Josep Mar 05 '13 at 11:21
  • This XML file comes from another IntelliJ instance, right? What does its content look like? – Bastien Jansen Mar 05 '13 at 13:06
  • After some time, I gave up trying to import the profile, and I decided to define it from new. Anyway, the file did come from another IDEA project. I will paste its content in the original question. – Josep Mar 06 '13 at 08:20