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

clang-format config #774

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

clang-format config #774

wants to merge 3 commits into from

Conversation

PROP65
Copy link
Contributor

@PROP65 PROP65 commented Feb 10, 2025

clang-format does not have the most granular configuration so some things (like different pointer placement on unnamed arguments in function prototypes) are not currently achievable.

From the tinkering I've done with it so far it seems that formatting before building yields better results. If formatting is done on the final header file all preprocessor directives will be further indented.

Major changes compared to current styling:

  • preprocessor directive indentation
  • max line length of 160

I'm open to changing the current config if needed, I'll admit it's far from perfect.

If needed I can format the src folder and rebuild once the style config is agreed on.

Here's nuklear.h after formatting and rebuilding with this change
https://gist.github.com/PROP65/bf35c5a22a210584d5057fb2b6a1323d

@PROP65
Copy link
Contributor Author

PROP65 commented Feb 10, 2025

#739

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.

1 participant