Thanks you for your interest in contributing to Cogs! In this document we'll outline what you need to know about contributing and how to get started.
In short, we’ll entertain anything that makes Cogs better in terms of stability, quality, and capability. This may take the shape of:
- Bug fixes
- Feature implementations
- Tests
- Readme and Wiki articles or updates
Before you start opening Pull Requests on the GitHub project, please review the Style Guidelines.
- Unless stated otherwise, use conventions implied by the default settings of Visual Studio
- For multi-statement blocks, use Allman style; for single statements, do not use braces
- Use four spaces of indentation (no tabs)
- Use camel case for
internal
andprivate
fields and usereadonly
where possible; do not prefix fields with_
- Do not use
this.
when not necessary - Do not specify the default visibility
private
; visibility should be the first modifier (e.g.public abstract
notabstract public
) - Specify namespace imports at the top of the file, outside of namepsace declarations, and sort them alphabetically
- Do not use more than one empty line at a time
- Do not include spurious free spaces (consider enabling "View Whitespace (Ctrl+E, S)" if using Visual Studio, to aid detection)
- Use language keywords instead of BCL types (e.g.
int
,string
,float
instead ofInt32
,String
,Single
, etc.) for both type references and method calls (e.g.int.Parse
instead ofInt32.Parse
) - Use
nameof(...)
instead of"..."
- Specify fields at the top, below constructor overloads and the finalizer