Convert ConvertTwoComparisonsToRangeCheck intention to inspection
Relates to #KT-17310
This commit is contained in:
@@ -1454,11 +1454,6 @@
|
||||
<category>Kotlin</category>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<className>org.jetbrains.kotlin.idea.intentions.ConvertTwoComparisonsToRangeCheckIntention</className>
|
||||
<category>Kotlin</category>
|
||||
</intentionAction>
|
||||
|
||||
<intentionAction>
|
||||
<className>org.jetbrains.kotlin.idea.intentions.ConvertRangeCheckToTwoComparisonsIntention</className>
|
||||
<category>Kotlin</category>
|
||||
@@ -2370,8 +2365,8 @@
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.ConvertTwoComparisonsToRangeCheckInspection"
|
||||
displayName="Convert two comparisons to 'in'"
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ConvertTwoComparisonsToRangeCheckInspection"
|
||||
displayName="Two comparisons should be converted to a range check"
|
||||
groupPath="Kotlin"
|
||||
groupName="Style issues"
|
||||
enabledByDefault="true"
|
||||
|
||||
-1
@@ -1 +0,0 @@
|
||||
fun foo(arg: Int) = arg in 1..4
|
||||
-1
@@ -1 +0,0 @@
|
||||
fun foo(arg: Int) = 1 <= arg && arg <= 4
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
This intention converts two consecutive comparisons to a range check (<b>in</b>).
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user