Naming convention inspections
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Class naming convention</problem_class>
|
||||
<description>Class name <code>a</code> doesn't match regex '[A-Z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Class naming convention</problem_class>
|
||||
<description>Class name <code>b</code> doesn''t match regex '[A-Z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>5</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Class naming convention</problem_class>
|
||||
<description>Class name <code>FOO_BAR</code> doesn''t match regex '[A-Z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.ClassNameInspection
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class a
|
||||
|
||||
object b
|
||||
|
||||
object FOO_BAR
|
||||
|
||||
enum class Foo {
|
||||
BAR_BAZ,
|
||||
BAZ_BAR,
|
||||
GoodName,
|
||||
_Foo,
|
||||
quuxDoo,
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>11</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Enum entry name <code>_Foo</code> doesn't match regex '[A-Z]([A-Za-z\d]*|[A-Z_\d]*)' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>12</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Enum entry name <code>quuxDoo</code> doesn't match regex '[A-Z]([A-Za-z\d]*|[A-Z_\d]*)' #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.EnumEntryNameInspection
|
||||
@@ -0,0 +1,13 @@
|
||||
class a
|
||||
|
||||
object b
|
||||
|
||||
object FOO_BAR
|
||||
|
||||
enum class Foo {
|
||||
BAR_BAZ,
|
||||
BAZ_BAR,
|
||||
GoodName,
|
||||
_Foo,
|
||||
quuxDoo,
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Function name <code>Foo</code> doesn't match regex '[a-z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Function name <code>FOO_BAR</code> doesn't match regex '[a-z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.FunctionNameInspection
|
||||
@@ -0,0 +1,5 @@
|
||||
fun Foo() {}
|
||||
|
||||
fun FOO_BAR() {}
|
||||
|
||||
fun xyzzy() {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>23</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Private property name <code>FOO_BAR</code> doesn't match regex '[a-z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
+1
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.PrivatePropertyNameInspection
|
||||
@@ -0,0 +1,32 @@
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
|
||||
const val THREE = 3
|
||||
|
||||
val xyzzy = 1
|
||||
|
||||
fun foo() {
|
||||
val XYZZY = 1
|
||||
val BAR_BAZ = 2
|
||||
}
|
||||
|
||||
object Foo {
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
}
|
||||
|
||||
class D {
|
||||
private val _foo: String
|
||||
|
||||
private val FOO_BAR: String
|
||||
|
||||
companion object {
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
|
||||
private val FOO_BAZ = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Property name <code>Foo</code> doesn't match regex '[a-z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<description>Property name <code>FOO_BAR</code> doesn't match regex '[a-z][A-Za-z\d]*' #loc</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.PropertyNameInspection
|
||||
@@ -0,0 +1,30 @@
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
|
||||
const val THREE = 3
|
||||
|
||||
val xyzzy = 1
|
||||
|
||||
fun foo() {
|
||||
val XYZZY = 1
|
||||
val BAR_BAZ = 2
|
||||
}
|
||||
|
||||
object Foo {
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
}
|
||||
|
||||
class D {
|
||||
private val _foo: String
|
||||
|
||||
private val FOO_BAR: String
|
||||
|
||||
companion object {
|
||||
val Foo: String = ""
|
||||
|
||||
var FOO_BAR: Int = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user