Skip to content

Code and Documentation Style Guide #241

Open
@DemoXinMC

Description

@DemoXinMC

As far as I know, SFML.NET doesn't have an official style guide for either code or in-code documentation. There is a general guide for C# coding conventions, but AFAIK, it doesn't cover things like maximum line length, use of expression bodies for one-line methods, or constructor signature format.

As I've been working through a lot of the issues, I've noticed a ton of inconsistencies in general code style:

  • Chained constructors frequently have their base() or this() chaining on a second line, even though both pieces are very short
  • Use of unsafe, fixed, and GC.Alloc() are very inconsistent across different classes despite being used for the same purposes
  • In-code documentation makes use of a LOT of lines that amount to ////////////////////////////// and this seems super wasteful
  • In-code documentation seems to be mostly stuck on the idea of keeping lines shorter than 80 characters; this seems super unnecessary in the modern landscape of large resolution screens

I will update this issue if/when I run into other prevalent inconsistencies. I would really like feedback about creating a set of actual guidelines so that we can unify the code and documentation quality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsFeatureNew functionality or extending of an existing one

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions