Code Inspection for combining multiple For...Next variables on the same line #6249
Labels
difficulty-02-ducky
Resolving these involves the internal API, but with relatively easy problems to solve.
enhancement
Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.
feature-inspections
up-for-grabs
Use this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Milestone
What
Combining multiple
Next
variables as inNext k, j, i
is legally valid code, only if each counter variable is listed as shown. Removing the counter variable without each closingNext
produces invalid code.Why
Combining variables into a single
Next
messes with default indenting. It also can be easily overlooked leading tofeaturesbugs. We all strive for clear code.Example
QuickFixes
Insert an ending
Next
, preferably including the counter variable, to show the ending of eachFor...Next
statement.Should Rubberduck offer one or more quickfix(es) for this inspection? Describe them here (note: all inspections allow for
IgnoreOnceQuickFix
, unless explicitly specified):QuickFix Name - SeparateEachCounterVariableFromACombinedForNextStatementQuickFix
Example code, after quickfix is applied:
Resources
Each inspection needs a number of resource strings - please provide a suggestion here:
The text was updated successfully, but these errors were encountered: