You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 4, 2025. It is now read-only.
We can potentially create Roslyn Analysers to detect common issues when people are using the runtime library or generated code. Examples of problems we can detect are:
Returning null from a service method.
Throwing an exception that isn't part of the service method definition.
To illustrate this, let's take the example of returning null from a service method. Thrift doesn't support null return results from service methods, and has no way to serialise that. So if someone writes the following code:
We can report an error when returning null since we know that it isn't a valid return result.
An example of a project that provides analysers like this is xUnit. It can detect problems like Theories not having the correct parameters passed to them at compile time, something that would typically cause a runtime error.
We can potentially create Roslyn Analysers to detect common issues when people are using the runtime library or generated code. Examples of problems we can detect are:
nullfrom a service method.To illustrate this, let's take the example of returning
nullfrom a service method. Thrift doesn't supportnullreturn results from service methods, and has no way to serialise that. So if someone writes the following code:We can report an error when returning null since we know that it isn't a valid return result.
An example of a project that provides analysers like this is xUnit. It can detect problems like Theories not having the correct parameters passed to them at compile time, something that would typically cause a runtime error.