This project follows the standard design guidelines for C#, and generally uses the default StyleCop ruleset to enforce these guidelines. The design rules are validated when we build the project, and any deviation from them causes the build to fail. There are, however, a few exceptions which are explained below.
We also use EditorConfig for cross-IDE style enforcement not handled by StyleCop, such as file encoding.
Some of the default rules have been overridden using a ruleset file, which is available here.
There are a few checks which are required, but currently not enforced by StyleCopAnalyzers. Therefore, it is up to the developer to ensure that these rules are adhered to.
Avoid the use of optional arguments. Use method overloading instead.
GOOD:
public void ExampleMethod(int required) :
this(required, "default string")
public void ExampleMethod(int required, string optional)
BAD:
public void ExampleMethod(int required, string optional = "default string")
Lines should be no longer than 120 characters long.
Avoid leaving unused imports in files.
In order to get full integration with Rider, either reload the solution or restart Rider completely.