Add inspection to detect boxes *Range.start & endInclusive
These properties can be replaced with equivalent collections first & last. #KT-15537 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
401d8c2d70
commit
162de77b71
@@ -3306,6 +3306,15 @@
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceRangeStartEndInclusiveWithFirstLastInspection"
|
||||
displayName="Replace Range 'start' or 'endInclusive' with 'first' or 'last'"
|
||||
groupPath="Kotlin"
|
||||
groupName="Style issues"
|
||||
enabledByDefault="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantRequireNotNullCallInspection"
|
||||
displayName="Redundant 'requireNotNull' or 'checkNotNull' call"
|
||||
groupPath="Kotlin"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports usages of <b>boxed</b> <code>Range.start</code> and <code>Range.endInclusive</code> properties.
|
||||
These properties can be replaced with <b>unboxed</b> <code>first</code> and <code>last</code> properties.
|
||||
Example: <b>range.start</b> can be replaced with <b>range.first</b>.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user