csharp-language-server-protocol icon indicating copy to clipboard operation
csharp-language-server-protocol copied to clipboard

ILinkedEditingRangeHandler should return a nullable result

Open allisonchou opened this issue 4 years ago • 3 comments

The LSP spec indicates LinkedEditingRange can return either return LinkedEditingRanges or null. However, it seems like the O# ILinkedEditingRangeHandler expects a non-nullable response type: https://github.com/OmniSharp/csharp-language-server-protocol/blob/de1591e91a176fb88442ecf7e2e30f7a2174e6c0/src/Protocol/Features/Document/LinkedEditingRangeFeature.cs#L23

allisonchou avatar Aug 25 '21 21:08 allisonchou

I believe ICodeActionHandler and ICompletionHandler also have nullability issues

ToddGrun avatar Aug 26 '21 23:08 ToddGrun

I noticed a lot of warnings about nullability when I enabled the .NET Analyzer warnings. We could mark CS8764, CS8644, CS8619, and I'm sure others as errors and get them fixed.

andyleejordan avatar Aug 26 '21 23:08 andyleejordan

Adding IDefinitionHandler to the list of interfaces needing nullability fixes

allisonchou avatar Oct 26 '21 01:10 allisonchou