Skip to content

feat: enable null reference type support #1733

feat: enable null reference type support

feat: enable null reference type support #1733

Triggered via pull request March 13, 2025 19:41
Status Success
Total duration 4m 27s
Artifacts

sonarcloud.yml

on: pull_request
check if SONAR_TOKEN is set in github secrets
0s
check if SONAR_TOKEN is set in github secrets
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 warnings
Build: src/Microsoft.OpenApi/Models/OpenApiPathItem.cs#L26
Nullability of reference types in return type of 'IDictionary<HttpMethod, OpenApiOperation>? OpenApiPathItem.Operations.get' doesn't match implicitly implemented member 'IDictionary<HttpMethod, OpenApiOperation> IOpenApiPathItem.Operations.get' (possibly because of nullability attributes).
Build: src/Microsoft.OpenApi/Models/References/OpenApiPathItemReference.cs#L56
Nullability of reference types in return type of 'IDictionary<HttpMethod, OpenApiOperation>? OpenApiPathItemReference.Operations.get' doesn't match implicitly implemented member 'IDictionary<HttpMethod, OpenApiOperation> IOpenApiPathItem.Operations.get' (possibly because of nullability attributes).
Build: src/Microsoft.OpenApi/Services/OpenApiWalker.cs#L1272
Non-nullable property 'Operation' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
Build: src/Microsoft.OpenApi/Services/OpenApiWalker.cs#L585
Cannot convert null literal to non-nullable reference type.
Build: src/Microsoft.OpenApi/Services/OpenApiFilterService.cs#L47
Possible null reference argument for parameter 'source' in 'Func<string, HttpMethod, OpenApiOperation, bool> OpenApiFilterService.GetRequestUrlsPredicate(Dictionary<string, List<string>> requestUrls, OpenApiDocument source)'.
Build: src/Microsoft.OpenApi/Services/OpenApiFilterService.cs#L228
Possible null reference return.
Build: src/Microsoft.OpenApi/Models/OpenApiRequestBody.cs#L140
Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)
Build: src/Microsoft.OpenApi/Reader/V2/OpenApiSecuritySchemeDeserializer.cs#L110
Complete the task associated to this 'TODO' comment. (https://rules.sonarsource.com/csharp/RSPEC-1135)
Build: src/Microsoft.OpenApi/Writers/OpenApiYamlWriter.cs#L76
Remove this commented out code. (https://rules.sonarsource.com/csharp/RSPEC-125)
Build: src/Microsoft.OpenApi/Models/OpenApiCallback.cs#L16
'IOpenApiCallback' implements 'IOpenApiReferenceable' so 'IOpenApiReferenceable' can be removed from the inheritance list. (https://rules.sonarsource.com/csharp/RSPEC-1939)