Open daFreeMan opened 5 years ago
Yea, I assume that's because a part of the logic for ignore annotations may fall back to checking the annotation based on the module's lines as retrieved from the VBE, which only respects physical lines, not logical lines...
Quite exactly. If there is any physical line with code in between, an annotation does not apply. This is how annotations currently work.
@MDoerner I'm not quite sure I buy that logic - in the simple code I provided at the end, the 2nd @Ignore
does work. i.e. there is no inspection generated on Function bar
.
I see the difference in the declarations. If I put the _
before (foo As Long)
, I do get the false positive inspection.
Rubberduck version information Version 2.4.1.4666 OS: Microsoft Windows NT 10.0.15063.0, x64 Host Product: Microsoft Office 2016 x64 Host Version: 16.0.4822.1000 Host Executable: EXCEL.EXE
Description Adding
'@Ignore ImplicitByRefModifier
to a function declaration does not work if there is a line continuation (_
) in the declaration.To Reproduce Steps to reproduce the behavior:
ByRef
Ignore Once
Expected behavior It works just fine without the line continuation, it should work equally well with the line continuation
Logfile RubberduckLog.txt
Additional context This code:
Generates one
Parameter 'nSize' is implicitly passed by reference
inspection on the second declaration (GetComputerName
).This, however, does not generate an inspection result for either variation: