Change MISSING_CONSTRUCTOR_KEYWORD severity to error
And adjust testData
This commit is contained in:
+3
@@ -1,4 +1,7 @@
|
||||
// "Add missing 'constructor' keyword in whole project" "true"
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
|
||||
annotation class Ann(val x: Int = 1)
|
||||
|
||||
|
||||
Vendored
+3
@@ -1,4 +1,7 @@
|
||||
// "Add missing 'constructor' keyword in whole project" "true"
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
// ERROR: Use 'constructor' keyword after modifiers of primary constructor
|
||||
|
||||
annotation class Ann(val x: Int = 1)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Remove 'protected' modifier" "true"
|
||||
|
||||
class A private <caret>protected () {
|
||||
class A private <caret>protected constructor() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Remove 'protected' modifier" "true"
|
||||
|
||||
class A private () {
|
||||
class A private constructor() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C private : Base<caret>
|
||||
class C private constructor : Base<caret>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(Int, Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
|
||||
class C private (p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
class C private constructor(p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
@@ -1,5 +1,5 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.SuperClassNotInitialized$AddParenthesisFix" "false"
|
||||
// ERROR: This type has a constructor, and thus must be initialized here
|
||||
open class Base private(p: Int)
|
||||
open class Base private constructor(p: Int)
|
||||
|
||||
class C : Base<caret>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Add constructor parameters from Base(String)" "true"
|
||||
open class Base private(p1: Int, val p2: Int) {
|
||||
open class Base private constructor(p1: Int, val p2: Int) {
|
||||
private constructor() : this(0, 1)
|
||||
protected constructor(s: String) : this(s.length(), 1)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Add constructor parameters from Base(String)" "true"
|
||||
open class Base private(p1: Int, val p2: Int) {
|
||||
open class Base private constructor(p1: Int, val p2: Int) {
|
||||
private constructor() : this(0, 1)
|
||||
protected constructor(s: String) : this(s.length(), 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user