PKBeam / Edda

A beatmap editor for the VR rhythm game Ragnarock
GNU General Public License v3.0
34 stars 8 forks source link

Common C# Coding Conventions #65

Closed Nytilde closed 1 year ago

Nytilde commented 1 year ago

I have applied an auto-formatter to use the Common C# Coding Conventions https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions

PKBeam commented 1 year ago

For code styles that are purely preferential (such as braces on new lines) I'd rather we stick to the existing convention of the project - that's generally seen as best practice.

If there are any inconsistencies that this PR clears up I'm happy for those to go through.

Nytilde commented 1 year ago

The topic came up in brolly's last PR. The aim is to consistently adhere to the layout conventions, since we use both notations with the brackets. I also can adjust the automatic conversion of the layout for the other bracket style as well.

PKBeam commented 1 year ago

Since most of the code uses braces on the same line, let's just stick with that then.

Brollyy commented 1 year ago

If we're re-formatting the codebase to adhere to some consistent code styling, I think we should also make sure that there are checks in place to make sure that this sticks and we don't have to redo it every so often - otherwise I see it as a wasted effort.

Nytilde commented 1 year ago

I hope this should fit. if you have any suggestions for changes, we can add them to the editorconfig as well.