Add inspection for potentially wrongly placed unary operators

So #KT-18236 Fixed
This commit is contained in:
shiraji
2017-06-11 00:21:09 -04:00
committed by Mikhail Glukhikh
parent eaea160f0e
commit 647558c98a
11 changed files with 198 additions and 0 deletions
@@ -0,0 +1,58 @@
<problems>
<problem>
<file>simple.kt</file>
<line>6</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>9</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>10</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>12</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>14</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>22</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
<problem>
<file>simple.kt</file>
<line>23</line>
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/simple.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Ambiguous unary operator use with number constant</problem_class>
<description>Wrap unary operator and value with ()</description>
</problem>
</problems>