Add "Redundant enum constructor invocation" inspection
#KT-29321 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
542d3c3532
commit
e8a8bc89c9
@@ -3239,6 +3239,15 @@
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantEnumConstructorInvocationInspection"
|
||||
displayName="Redundant enum constructor invocation"
|
||||
groupPath="Kotlin"
|
||||
groupName="Redundant constructs"
|
||||
enabledByDefault="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<referenceImporter implementation="org.jetbrains.kotlin.idea.quickfix.KotlinReferenceImporter"/>
|
||||
|
||||
<fileType.fileViewProviderFactory filetype="KJSM" implementationClass="com.intellij.psi.ClassFileViewProviderFactory"/>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports redundant enum entry constructor invocation:
|
||||
|
||||
<pre>
|
||||
enum class Foo {
|
||||
A(), // This '()' is redundant.
|
||||
B(),
|
||||
C
|
||||
}
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user