VEGO-Engine / Engine

2 stars 0 forks source link

Implement linter and formatter #63

Open Nimac0 opened 1 week ago

Nimac0 commented 1 week ago

uwu beni make presentation please 👉👈 (explaining the options)

https://clang.llvm.org/docs/ClangFormatStyleOptions.html#basedonstyle

Nanogamer7 commented 1 week ago

Consist of:

Nanogamer7 commented 4 days ago

The SDL foundation provides their style guidelines used within SDL, which are based on the LLVM style set. Using it would make sense as we are an SDL based project, however it does do some minor things differently than they are right now in the code base - to some degree at least. This would be alleviated somewhat by the fact that we could apply the style set automatically, but we would need to agree on it.

https://github.com/sdlfoundation/sdl-cpp-style/tree/master

To test this style guide, copy the .clang-format from the linked repository above, run clang-format --style=file -i ./src/*.cpp and clang-format --style=file -i ./include/*.h from the engine's root, but do not commit any changes, as this would taint the git contributions. Also make sure you don't have any uncommited/stashed changes before testing the format, as the easiest way to revert the formatter is to discard changes.