stride icon indicating copy to clipboard operation
stride copied to clipboard

Annotate with nullable attributes

Open Kryptos-FR opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. Currently the nullable feature is not enabled on most projects. Instead we have some old custom attributes (such as [NoNull]) that are implemented in Stride.Core. These attributes are compatible with Resharper but are ignored by the actual .NET analyzers.

Describe the solution you'd like Annotate our code with attributes from https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis. Then gradually enable the nullable feature on projects.

Describe alternatives you've considered None. It can be really useful to detect issues and is expected in modern codebase.

Additional context It will likely result in lots of warnings. To reduce overload, we can start with the editor and assets assemblies and then the core assemblies. Later apply to the remaining engine assemblies.

Kryptos-FR avatar Feb 13 '24 17:02 Kryptos-FR