Skip to content

Commit 091c3e6

Browse files
committed
Modify comment in MoveCloserToUsageRefactoring
Previously, it sounded too alarming.
1 parent c2d3547 commit 091c3e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Rubberduck.Refactorings/MoveCloserToUsage/MoveCloserToUsageRefactoring.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,13 @@ private string PaddedDeclaration(string declarationText, VBAParser.BlockStmtCont
262262

263263
return $"{declarationText}{Environment.NewLine}";
264264
}
265-
//This is the first statement, which actually should not happen.
265+
//This is the very first statement. In the context of this refactoring, this should not happen since we move a declaration into or inside a method.
266+
//We will handle this edge-case nonetheless and return the result with the proper indentation for this special case.
266267
if (blockStmtContext.TryGetPrecedingContext(out VBAParser.WhiteSpaceContext startingWhitespace))
267268
{
268269
return $"{declarationText}{Environment.NewLine}{startingWhitespace?.GetText()}";
269270
}
270271

271-
//We are at the start of the module, which should not be possible.
272272
return $"{declarationText}{Environment.NewLine}";
273273
}
274274

0 commit comments

Comments
 (0)