github / github/codeql

LGTM.com - false positive - Variable ... may be null - C#

Open
#2,785 1 comment 0 reactions 1 assignee Claimed by @calumgrant View on GitHub
C# false-positive
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**Description of the false positive**

The alert is generated from the following snippet:
```csharp
EnsureArg.IsNotNull(bundleConfiguration?.Value, nameof(bundleConfiguration));
// ...
_bundleConfiguration = bundleConfiguration.Value;
```

`EnsureArg` is a third party library used to check arguments. Here, because of the null-conditional, `bundleConfiguration` and `bundleConfiguration.Value` are guarded against nulls in this case.

https://lgtm.com/projects/g/microsoft/fhir-server/snapshot/5a4188bc14abc65f5509d1aea5d5cf87648a85a3/files/src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandler.cs?sort=name&dir=ASC&mode=heatmap#x6213a27b1dff5ecf:1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.