@@ -3205,30 +3205,10 @@ extends Message(UnusedSymbolID) {
3205
3205
}
3206
3206
3207
3207
object UnusedSymbol {
3208
- private def removeDefinitionAtPos (treePos : SourcePosition )(using Context ): List [CodeAction ] = {
3209
- val source = treePos.source
3210
- val sourcePos = treePos.sourcePos
3211
- val endLine = source.offsetToLine(sourcePos.end - 1 )
3212
- val nextLineOffset = source.lineToOffset(endLine + 1 )
3213
- val startOffset = source.lineToOffset(sourcePos.startLine)
3214
-
3215
- val pathes = List (
3216
- ActionPatch (
3217
- srcPos = sourcePos.withSpan(sourcePos.span.withStart(startOffset).withEnd(nextLineOffset)),
3218
- replacement = " "
3219
- ),
3220
- )
3221
- List (
3222
- CodeAction (title = s " Remove unused code " ,
3223
- description = None ,
3224
- patches = pathes
3225
- )
3226
- )
3227
- }
3228
- def imports (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused import " , List .empty)
3229
- def localDefs (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused local definition " , removeDefinitionAtPos(treePos))
3230
- def explicitParams (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused explicit parameter " , List .empty)
3231
- def implicitParams (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused implicit parameter " , List .empty)
3232
- def privateMembers (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused private member " , removeDefinitionAtPos(treePos))
3233
- def patVars (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused pattern variable " , List .empty)
3208
+ def imports (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused import " , Nil )
3209
+ def localDefs (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused local definition " , Nil )
3210
+ def explicitParams (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused explicit parameter " , Nil )
3211
+ def implicitParams (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused implicit parameter " , Nil )
3212
+ def privateMembers (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused private member " , Nil )
3213
+ def patVars (treePos : SourcePosition )(using Context ): UnusedSymbol = new UnusedSymbol (treePos, i " unused pattern variable " , Nil )
3234
3214
}
0 commit comments