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

WIP: add a .clang-format config file #1443

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

Conversation

seanm
Copy link
Contributor

@seanm seanm commented Jan 23, 2024

No description provided.

@mcuee mcuee added the Misc Whitespace, typo, coding style, etc label Jan 23, 2024
@tormodvolden tormodvolden marked this pull request as draft January 23, 2024 08:47
@Youw
Copy link
Member

Youw commented Jan 23, 2024

Can you make another draft/PR with formatting already applied?
(and include .git-blame-ignore-revs, if feasible)

@seanm
Copy link
Contributor Author

seanm commented Jan 23, 2024

Yes, I can do that... but I'll wait for some more feedback from others about what options the project wants.

In my local copy, I do diffs using Araxis Merge which has some nice options to ignore only leading whitespace, trailing whitespace, inner whitespace, etc. With my current .clang-format file, if I ignore leading and trailing whitespace, there aren't very many changes in fact.

@Youw
Copy link
Member

Youw commented Jan 23, 2024

more feedback from others about what options the project wants

Because most of us are not clang-format options experts, it is hard to tell w/o applying and checking what's changed. That's exactly why I'm suggesting a PR to look at.

options to ignore only leading whitespace, trailing whitespace, inner whitespace

Github also has an option to "Hide whitespace" changes when viewing a PR. That should help.

Based on detection using `whatstyle`, specificly:

whatstyle.py -f clang-format core.c descriptor.c hotplug.c io.c

Only thing I added manually was the list of `ForEachMacros`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Misc Whitespace, typo, coding style, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants