[Discussion] Define a code style
WalshyDev opened this issue ยท 2 comments
Slimefun is a community project. This means there should be set guides on things such as how the project is formatted. Right now there's a lot of... uncommon formatting styles (such as using tabs, else on a new line). What I recommend is having a set code style (preferably one well-known and well respected).
There have been many cases where members of the community (me included) have formatted an entire file (or sometimes even way more) and had to them remove that. This is because everyone follows the more "standard" formatting conventions which @TheBusyBiscuit does not follow. There should be set style guidelines for everyone.
The things I suggest we follow:
- Use 4 spaces as indentation (please for the love of god)
- Properly follow the one true brace style (1TBS)
- Follow a column limit of 100 characters
These are the main points, there's some other small ones but they seem be getting slowly corrected (for example for (X x : y)
rather than for (X x: y)
I recommend using the Google Java style guide. I am open to other suggestions along with a discussion about any amendments.
This should also be added to the PR template as a checkbox "I have followed the style guide" (obviously also linking there).
This is a Bug Tracker...
If you wanna start a discussion, then go to discord or so.