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

Add Code Formatting (#331) #332

Merged
merged 3 commits into from
Aug 31, 2024
Merged

Conversation

furudbat
Copy link
Contributor

@furudbat furudbat commented Aug 31, 2024

Hello,
I added my .clang-format mixed with nuklear_console .clang-format changes.

I also tried to close as possible to raylib CONVENTIONS:
The Name convention can be forced with .clang-tidy readability-identifier-naming.*.

  • ALWAYS initialize all defined variables.
  • Do not use TABS, use 4 spaces instead.
  • Avoid trailing spaces, please, avoid them
  • Control flow statements always are followed by a space Use more common~~/"modern"~~ C++ style, see BraceWrapping
  • Directories will be named using snake_case (see examples/), C++ files are always PascalCase and with an .hpp-extension, avoid confusion with .h C files
  • C raylib uses right-alignment pointers, my and RobLoach's .clang-format uses left-align pointers

I try to make the style as close as possible to raylib AND modern C++, @RobLoach pls verify this style and use it from now on, make changes as you wishes ... after that I would recommend formatting the code before/after mergen an PR.
(Use the formatted files as a "preview")


For convince, I added a CMake command format, I personally using Format.cmake, making a simple command does the job (I'm sure there are better solutions)

@RobLoach RobLoach merged commit 09b029d into RobLoach:master Aug 31, 2024
8 checks passed
@RobLoach
Copy link
Owner

Thanks so much! Looks great.

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

Successfully merging this pull request may close these issues.

2 participants