Inspections: Add inspection on equals()/hashCode()

This commit is contained in:
Alexey Sedunov
2015-10-15 18:57:08 +03:00
parent 127cb36602
commit 6f5d977728
8 changed files with 222 additions and 23 deletions
@@ -0,0 +1,42 @@
<problems>
<problem>
<file>test.kt</file>
<line>1</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">equals() and hashCode() not paired</problem_class>
<description>Class has &lt;code&gt;equals()&lt;/code&gt; defined but does not define &lt;code&gt;hashCode()&lt;/code&gt;</description>
</problem>
<problem>
<file>test.kt</file>
<line>5</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">equals() and hashCode() not paired</problem_class>
<description>Class has &lt;code&gt;hashCode()&lt;/code&gt; defined but does not define &lt;code&gt;equals()&lt;/code&gt;</description>
</problem>
<problem>
<file>test.kt</file>
<line>14</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">equals() and hashCode() not paired</problem_class>
<description>equals()/hashCode() in object declaration</description>
</problem>
<problem>
<file>test.kt</file>
<line>18</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">equals() and hashCode() not paired</problem_class>
<description>equals()/hashCode() in object declaration</description>
</problem>
<problem>
<file>test.kt</file>
<line>22</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">equals() and hashCode() not paired</problem_class>
<description>equals()/hashCode() in object declaration</description>
</problem>
</problems>