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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement linter and formatter #63

Open
Nimac0 opened this issue Jun 15, 2024 · 2 comments
Open

Implement linter and formatter #63

Nimac0 opened this issue Jun 15, 2024 · 2 comments
Assignees
Labels
devOps Tasks surrounding DevOps

Comments

@Nimac0
Copy link
Contributor

Nimac0 commented Jun 15, 2024

uwu beni make presentation please 馃憠馃憟 (explaining the options)

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

@Nimac0 Nimac0 added the devOps Tasks surrounding DevOps label Jun 15, 2024
@Nanogamer7
Copy link
Contributor

Consist of:

  • Agree on a style guide to be used (see link above
  • Automatically apply style guide with bot account to avoid bloated contribution stats (clang bot already outputs a diff that can be used)

@Nanogamer7
Copy link
Contributor

Nanogamer7 commented Jun 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devOps Tasks surrounding DevOps
Projects
None yet
Development

No branches or pull requests

2 participants