Add Step One Quick Fix
Adds an explicit Step specifier to a For loop instruction.
This quick-fix is available for the StepIsNotSpecified inspection
Applicability
This quick-fix can be applied as a single operation at the following scopes:- Procedure
- Module
- Project
Examples
This example depicts the state of module(s) before and after applying the quick-fix.
Before
Module1 (Any)
Public Sub DoSomething()
Dim i As Long
For i = 1 To 10
Debug.Print i
Next
End Sub
After
Module1 (Any)
Public Sub DoSomething()
Dim i As Long
For i = 1 To 10 Step 1
Debug.Print i
Next
End Sub
Rubberduck.CodeAnalysis.QuickFixes.Concrete.AddStepOneQuickFix.cs (Prerelease-v2.5.2.6174)