Back to Elsa Core

Pull Request Quality Standard Checklist

doc/bounty/bounty-quality-standards.md

3.6.12.3 KB
Original Source

Pull Request Quality Standard Checklist

Coding Standards

  • Follows Microsoft's coding guidelines, 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.