Function Return Value Always Discarded
Warns when a user function's return value is discarded at all its call sites.
Reasoning
A 'Function' procedure normally means its return value to be captured and consumed by the calling code. It's possible that not all call sites need the return value, but if the value is systematically discarded then this means the function is side-effecting, and thus should probably be a 'Sub' procedure instead.
Default severity
Warning
Inspection type
CodeQualityIssues
Examples
This example should trigger a result
This example should NOT trigger a result
Rubberduck.CodeAnalysis.Inspections.Concrete.FunctionReturnValueAlwaysDiscardedInspection.cs (Prerelease-v2.5.9.6289)