Implemented simplest version of unused symbol inspection.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>unused.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/unused.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Class 'A' is never used</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>usedOnlyInside.kt</file>
|
||||
<line>1</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/usedOnlyInside.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Class 'A' is never used</description>
|
||||
</problem>
|
||||
<problem>
|
||||
<file>localUnused.kt</file>
|
||||
<line>2</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/localUnused.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Class 'Local' is never used</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.UnusedSymbolInspection
|
||||
@@ -0,0 +1,4 @@
|
||||
fun f() {
|
||||
class Local {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun f() {
|
||||
class Local {
|
||||
|
||||
}
|
||||
|
||||
Local()
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
class A
|
||||
@@ -0,0 +1,4 @@
|
||||
class A
|
||||
|
||||
fun f(): A {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class A {
|
||||
fun f(other: A) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user