-
-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Our code style is different from a lot of .NET projects, such as ASP.NET Core. One big difference is we don't put start brace on new line, instead we put it at line end. This won't cause problem if only 1 person develop our project, but obviously there are many people are, or were participate in development process. Their development environment is configured to their shape, which includes code style that may be different to us. As for me, my code style is almost aligned with general .NET style. The style discrepancy between me and Steamworks.NET caused a restyle commit in #674.
Do we have some tool to manage code style, prevent restyle nowadays? Yes of course. EditorConfig is used to specify code style in a human readable text file. This file is called .editorconfig and can be stored in git repository directly. As we distribute that file along our code, any supported editor will read it then overlay on original style of contributor. In result, contributed code will have consistent style, as contributor remember to press format hotkey.
I would like project owner @rlabrecque to create and share .editorconfig files to contributors. In addition, I'd recommend to create .editorconfig for Python and C# code in separate. We manage C# style in /.editorconfig located in repository root, and manage Python style in /CodeGen/.editorconfig respectively.
If you want to contribute .editorconfig, here are some helpful links about mainstream editors.