Skip to content

Commit d06cd93

Browse files
add SUGGEST_NULLABLE_ANNOTATIONS inspection
add ConstantConditions.SUGGEST_NULLABLE_ANNOTATIONS to inspections. This inspection flags code that mixes `@Nullable` values and non-`@Nullable` params. Such code is likely erroneous and a common place for NPEs to hide.
1 parent b5d3e81 commit d06cd93

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

configs/inspection/Square.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<inspections version="1.0" is_locked="false">
33
<option name="myName" value="Square" />
4+
<inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
5+
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" />
6+
</inspection_tool>
47
<inspection_tool class="FallthruInSwitchStatement" enabled="true" level="ERROR" enabled_by_default="true" />
58
<inspection_tool class="UnnecessarySemicolon" enabled="true" level="ERROR" enabled_by_default="true" />
69
</inspections>

0 commit comments

Comments
 (0)