You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:
Version 2.5.9.6289
OS: Microsoft Windows NT 10.0.19045.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.17231.20008
Host Executable: EXCEL.EXE
Description
Indenting is failing on the below line of code.
Public Sub SubName()
'@PossibleError: Type mismatch(13) if given input is not an array
Dim X As Long
X = X + 1
End Sub
It failed if I got rid of the @ from the comment as well. It successfully indent if I don't put any space after @PossibleError from the comment line.
Expected behavior
Expected indentation:
Public Sub SubName()
'@PossibleError: Type mismatch(13) if given input is not an array
Dim X As Long
X = X + 1
End Sub
The text was updated successfully, but these errors were encountered:
Repro'd online; removing the : colon formats the resulting code as expected - the indenter is probably getting confused with line labels... if I recall there's some regex-matching involved, in which case the fix for this is probably just a few characters in a regex pattern.
The plan for RD3 is to leverage parse trees for code formatting (we've talked about rewriting the indenter to do this, for years!), so this kind of problems pretty much solve themselves, because our parser has no problem telling a comment from a line label.
Rubberduck version information
The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:
Version 2.5.9.6289
OS: Microsoft Windows NT 10.0.19045.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.17231.20008
Host Executable: EXCEL.EXE
Description
Indenting is failing on the below line of code.
It failed if I got rid of the @ from the comment as well. It successfully indent if I don't put any space after @PossibleError from the comment line.
Expected behavior
Expected indentation:
The text was updated successfully, but these errors were encountered: