From 561247a406ced8d8293dc87ecbc8d96d4d37e4e6 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 4 Jul 2024 10:25:38 +0200 Subject: [PATCH] Create bounty-quality-standards.md --- docs/bounty-quality-standards.md | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/bounty-quality-standards.md diff --git a/docs/bounty-quality-standards.md b/docs/bounty-quality-standards.md new file mode 100644 index 000000000..dd2407250 --- /dev/null +++ b/docs/bounty-quality-standards.md @@ -0,0 +1,40 @@ +# Pull Request Quality Standard Checklist + +## Coding Standards +- [ ] Follows [Microsoft's coding guidelines](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions), with the following exceptions: + - **Use of `var`**: Use `var` for variable declarations consistently. See rationale below. + +## Documentation +- [ ] XML comments provided for all public members. +- [ ] Inline comments explain complex logic. + +## Testing +- [ ] Unit tests cover critical functions. +- [ ] Integration tests for major workflows. +- [ ] High code coverage. + +## Code Review +- [ ] Peer review completed. +- [ ] Passes automated code analysis. + +## Continuous Integration +- [ ] CI checks pass (builds, tests, style checks). + +## Performance and Security +- [ ] Performance is optimized where necessary. +- [ ] Security best practices followed. + +## Dependencies and Compatibility +- [ ] Dependencies are managed and up to date. +- [ ] No breaking changes without documentation. + +### Rationale for Using `var` + +We have chosen to use `var` consistently in our codebase for the following reasons: + +1. **Cleaner Code**: Using `var` reduces visual clutter and makes the code cleaner and more readable. It helps avoid redundant type information, especially when the type is already apparent from the right-hand side of the declaration. +2. **Modern IDEs**: Tools like Visual Studio and other modern IDEs provide features such as hover or tool tips that easily display variable types, alleviating concerns about readability. This makes it unnecessary to explicitly specify the type, as it can be easily inferred by the developer. +3. **Consistency and Maintenance**: Consistent use of `var` across the codebase promotes uniformity and reduces the mental load on developers. It simplifies refactoring because changes to the type do not require updating the variable declaration. +4. **Focus on Logic**: By using `var`, developers can focus on the logic and functionality of the code rather than getting bogged down by type details. This is particularly beneficial in complex expressions and LINQ queries where the type is often verbose and less important than the expression itself. + +These points align with the insights from Chris Schaller's blog post "To var or not to var," which emphasizes that using `var` can lead to more maintainable and readable code in the context of modern development environments.