Temporarily disabled "Unused symbol" for companion objects.
This commit is contained in:
@@ -107,6 +107,9 @@ public class UnusedSymbolInspection : AbstractKotlinInspection() {
|
||||
if (declaration is JetParameter && (declaration.getParent()?.getParent() !is JetClass || !declaration.hasValOrVarNode())) return
|
||||
if (declaration is JetNamedFunction && isConventionalName(declaration)) return
|
||||
|
||||
// TODO companion objects are temporarily disabled
|
||||
if (isCompanionObject) return
|
||||
|
||||
// More expensive, resolve-based checks
|
||||
if (isEntryPoint(declaration)) return
|
||||
// properties can be referred by component1/component2, which is too expensive to search, don't mark them as unused
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<description>Object 'A' is never used</description>
|
||||
</problem>
|
||||
|
||||
<!--
|
||||
<problem>
|
||||
<file>defaultObjectUnused.kt</file>
|
||||
<line>2</line>
|
||||
@@ -49,4 +50,5 @@
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Object 'Named' is never used</description>
|
||||
</problem>
|
||||
-->
|
||||
</problems>
|
||||
|
||||
Reference in New Issue
Block a user