Add inspection to move the variable declaration into when
#KT-29001 Fixed
This commit is contained in:
@@ -2932,6 +2932,15 @@
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.MoveVariableDeclarationIntoWhenInspection"
|
||||
displayName="Variable declaration could be moved inside `when`"
|
||||
groupPath="Kotlin"
|
||||
groupName="Style issues"
|
||||
enabledByDefault="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.MainFunctionReturnUnitInspection"
|
||||
displayName="Entry point function should return Unit"
|
||||
groupPath="Kotlin"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports the variable declaration that can be moved inside <code>when</code> expression.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user