Skip to content

False positive FunctionReturnValueDiscardedInspection with Err.Raise Sub #5480

@IvenBach

Description

@IvenBach

Rubberduck version information
Version 2.5.0.29079
OS: Microsoft Windows NT 10.0.18362.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4978.1000
Host Executable: EXCEL.EXE

Description
The inspection is triggering on a Sub.

Public Sub MVCE()
    Err.Raise -1, "Foo", "Bar"
End Sub

To Reproduce
Steps to reproduce the behavior:

  1. Insert module, Add above code, Parse & view inspections

Expected behavior
Have inspection trigger only on functions.

Metadata

Metadata

Assignees

Labels

bugIdentifies work items for known bugs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions