Query module UncheckedReturnValue

name
Unchecked return value
description
If most of the calls to a method use the return value of that method, the calls that do not check the return value may be mistakes.
kind
problem
problem.severity
warning
precision
low
id
cs/unchecked-return-value
tags
reliability correctness external/cwe/cwe-252 statistical non-attributable

Imports

Chaining

Provides detection of callables designed for chaining.

IO

Provides definitions related to the namespace System.IO.

csharp

The default C# QL library.

Predicates

chainedUses
dubious

Holds if m is a method whose return value should be checked because most calls to m do.

hasQualifierAndTarget
important

Holds if m is a method whose return value should always be checked.

methodHasGenericReturnType

Holds if the return type of m is an instantiated type parameter from m.

whitelist

Holds if m is a white-listed method where checking the return value is not required.

Classes