2020-04-19 16:29:31 +01:00
|
|
|
## How you can contribute
|
2022-04-30 16:56:36 +01:00
|
|
|
|
|
|
|
Contributions to this project are always welcome. If you spot a bug, or want to request a new extension method, open a new issue
|
|
|
|
or submit a pull request.
|
2020-04-19 16:29:31 +01:00
|
|
|
|
|
|
|
### Pull request guidelines
|
2022-04-30 16:56:36 +01:00
|
|
|
|
2023-03-31 17:30:30 +01:00
|
|
|
This project uses C# 11.0 language features where feasible, and adheres to StyleCop rules with some minor adjustments.
|
2022-04-30 16:56:36 +01:00
|
|
|
There is an `.editorconfig` included in this repository. For quick and painless pull requests, ensure that the analyzer does not
|
|
|
|
throw warnings.
|
2020-04-19 16:29:31 +01:00
|
|
|
|
2023-04-12 12:47:32 +01:00
|
|
|
Please ensure that you follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
|
|
specification, as the GitHub release for this project is automatically generated from the commit history, and formatted using the
|
|
|
|
convetional commits specification.
|
|
|
|
|
2020-04-19 16:29:31 +01:00
|
|
|
### Code style
|
2022-04-30 16:56:36 +01:00
|
|
|
|
2020-04-19 16:29:31 +01:00
|
|
|
Below are a few pointers to which you may refer, but keep in mind this is not an exhaustive list:
|
|
|
|
|
2023-03-31 17:30:30 +01:00
|
|
|
- Use C# 11.0 features where possible
|
2022-04-30 16:56:36 +01:00
|
|
|
- Try to ensure code is CLS-compliant. Where this is not possible, decorate methods with `CLSCompliantAttribute` and pass `false`
|
|
|
|
- Follow all .NET guidelines and coding conventions.
|
|
|
|
See https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions
|
|
|
|
and https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/
|
2021-03-03 21:59:43 +00:00
|
|
|
- Make full use of XMLDoc and be thorough - but concise - with all documentation
|
|
|
|
- Ensure that no line exceeds 130 characters in length
|
2020-04-19 16:29:31 +01:00
|
|
|
- Do NOT include file headers in any form
|
2021-03-03 21:59:43 +00:00
|
|
|
- Declare `using` directives outside of namespace scope
|
|
|
|
- Avoid using exceptions for flow control where possible
|
|
|
|
- Use braces, even for single-statement bodies
|
2022-04-30 16:56:36 +01:00
|
|
|
- Use implicit type when the type is apparent
|
|
|
|
- Use explicit type otherwise
|
2021-03-03 21:59:43 +00:00
|
|
|
- Use U.S. English throughout the codebase and documentation
|
|
|
|
|
2022-04-30 16:56:36 +01:00
|
|
|
When in doubt, follow .NET guidelines.
|
2020-04-19 16:29:31 +01:00
|
|
|
|
|
|
|
### Tests
|
2022-04-30 16:56:36 +01:00
|
|
|
|
|
|
|
When introducing a new extension method, you must ensure that you have also defined a unit test that asserts its correct behavior.
|
2023-03-31 15:18:05 +01:00
|
|
|
The code style guidelines and code-analysis rules apply to the `X10D.Tests` as much as `X10D`, although documentation may
|
2022-04-30 16:56:36 +01:00
|
|
|
be briefer. Refer to existing tests as a guideline.
|
2020-04-19 16:29:31 +01:00
|
|
|
|
|
|
|
### Disclaimer
|
2022-04-30 16:56:36 +01:00
|
|
|
|
2023-03-31 15:18:05 +01:00
|
|
|
In the event of a code style violation, a pull request may be left open (or closed entirely) without merging. Keep in mind this does
|
2022-04-30 16:56:36 +01:00
|
|
|
not mean the theory or implementation of the method is inherently bad or rejected entirely (although if this is the case, it will
|
|
|
|
be outlined)
|