SSBasedInspections are being reported as IDs in 2024.1

已回答

I am running inspections on my project using a custom inspection profile.

inspectionProfile1.xml

<inspection_tool class="SSBasedInspection" enabled="true" level="ERROR" enabled_by_default="true">
<searchConfiguration name="Missing Nullability Contract on Return Type - NotNull or Nullable" text="@$Annotation$ $ReturnType$ $Method$($ParameterType$ $Parameter$);" recursive="true" caseInsensitive="true" type="JAVA" pattern_context="member">
       <constraint name="__context__" within="" contains="" />
       <constraint name="Annotation" regexp=".*Null.*" minCount="0" maxCount="0" within="" contains="" />
       <constraint name="ReturnType" regexp="Object" withinHierarchy="true" target="true" within="" contains="" />
       <constraint name="Method" within="" contains="" />
       <constraint name="Parameter" minCount="0" maxCount="2147483647" within="" contains="" />
       <constraint name="ParameterType" within="" contains="" />
     </searchConfiguration>
   </inspection_tool>

 

When I'm running inspection on my project using IDEA 2021.1.1, I see inspections being reported as ‘SSBasedInspections’,

but after upgrade to 2024.1, the inspections belonging to this particular searchConfiguration are being reported as 

cf07e82b-ee0e-37be-9e94-913f173bf8f2

Similarly for all other searchConfigurations, a different ID is being created and assigned.

Upon export, in .descriptions.xml. I see
For IDEA 2021.1.1 - 

<group name="Structural search" path="">
   <inspection shortName="cf07e82b-ee0e-37be-9e94-913f173bf8f2" defaultSeverity="WARNING" displayName="Missing Nullability Contract on Return Type - NotNull or Nullable" enabled="true" isGlobalTool="false">No description provided</inspection>
</group>

 

And for IDEA 2024.1 - 

<group name="Structural search" path="User defined">
<inspection shortName="cf07e82b-ee0e-37be-9e94-913f173bf8f2" defaultSeverity="WARNING" displayName="Missing Nullability Contract on Return Type - NotNull or Nullable" enabled="true" isGlobalTool="false">No description provided</inspection>
</group>

 

I have a tool to compare inspection results by 2021.1.1 and 2024.1 for my project which reads the generated XMLs. 

Here, the “old” version is 2021.1.1 & the “new” version is 2024.1. What is causing this & how can I go about fixing it?


PS - Created IDEA-352164 for the same

1

Hi Apoorv - we will check IDEA-352164 and reply on YouTrack, thank you.

0

请先登录再写评论。