Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Create code styling MD #59

Open
AaronJThompson opened this issue Oct 21, 2020 · 3 comments
Open

[ENH] Create code styling MD #59

AaronJThompson opened this issue Oct 21, 2020 · 3 comments
Assignees
Labels
housekeeping Issues about GmodDotNet infrastructure, management, legal, etc.
Milestone

Comments

@AaronJThompson
Copy link
Member

Overview

As more developers join the project (hopefully I will become a contributor once work cools down), it will become increasingly difficult to maintain standardized code styling across the project, making it harder to read.

It will also be difficult to reject PR's due to code styling if there isn't a standard put in place.

Therefore I suggest we create a coding style MD (could be joined with a Best Practices MD) that we can all agree on when contributing code to the project. We can then also create code formatters based on this as well, possibly even linking it to CI so that PR's are blocked for incorrect formatting

Open to opinions on this one

@AaronJThompson AaronJThompson added the enhancement New feature or request label Oct 21, 2020
@GlebChili GlebChili added this to the 0.7.0 milestone Oct 22, 2020
@GlebChili
Copy link
Member

@AaronJThompson Yes, we definitely need code style guidelines. I think we should also use something like FxCop to make MSBuild to automatically detect style violations on managed code.

@SupinePandora43
Copy link
Member

what's about create .editorconfig?

@GlebChili GlebChili modified the milestones: 0.7.0, Future Nov 13, 2020
@SupinePandora43
Copy link
Member

There's tool for c#
https://github.com/dotnet/format
Uses .editorconfig
Can return non zero code for checks (--check).
Also can format code in source files.

.editorcofig can't cover the whole code styling, but already enough for things like

  • Spacing size and type
  • File encoding, line ending
  • Space trimming (excellent feature)
  • Newline insertion at end of file

Also contains many advanced settings (hope page will be in your native language)

@GlebChili GlebChili added housekeeping Issues about GmodDotNet infrastructure, management, legal, etc. and removed enhancement New feature or request labels Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Issues about GmodDotNet infrastructure, management, legal, etc.
Projects
None yet
Development

No branches or pull requests

3 participants