Skip to content

ParameterNotUsedInspection

Max Dörner edited this page Jun 2, 2019 · 3 revisions

Description: Parameter is not used

Type: CodeInspectionType.CodeQualityIssues

Default severity: CodeInspectionSeverity.Warning

This inspection finds procedure parameters that are not used within the procedure they are declared for.

Example:

Parameter foo is not used in this method.

Public Sub DoSomething(foo As Integer)
    Dim bar As Integer
    bar = 42
    DoSomethingElse bar
End Sub

Parameter foo could be removed without affecting the procedure's logic.


QuickFixes

This inspection does not have any quickfixes implemented in version 1.2; future versions will suggest a change signature refactoring involving the removal of the unused parameter. It would be trivial to simply remove the parameter from the signature, but doing so without inspecting every call to that procedure may break the code - hence this quickfix is postponed until a change signature refactoring is implemented.

Clone this wiki locally