8000 Enforce C style by vhotspur · Pull Request #51 · d-iii-s/msim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enforce C style #51

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

Merged
merged 12 commits into from
Jan 9, 2024
Merged

Enforce C style #51

merged 12 commits into from
Jan 9, 2024

Conversation

vhotspur
Copy link
Member
@vhotspur vhotspur commented Nov 23, 2023

Convert to a unified C style (enforcing new rules in each commit) with CI-enforced checks.

Changes applied and enforced:

  • Unix endings (LF, EOF) and UTF-8 only
  • space-only indentation
  • braces around single-line statements (always)
  • #includes sorted

@lbulej
Copy link
Member
lbulej commented Nov 24, 2023

Can I play with .clang-format settings too? :-)

@vhotspur
Copy link
Member Author

Can I play with .clang-format settings too? :-)

Are you in such hurry? I still have some stashed changes and I am adding the rules slowly so that I can still reasonably review that the automated formatting have not broken anything.

And no, there will be no spaces in function calls ;-).

@lbulej
Copy link
Member
lbulej commented Nov 24, 2023

Can I play with .clang-format settings too? :-)

Are you in such hurry? I still have some stashed changes and I am adding the rules slowly so that I can still reasonably review that the automated formatting have not broken anything.

Not really in hurry. I'm just asking for general permission to potentially chime in, because I don't like how clang formats some of the things :-)

And no, there will be no spaces in function calls ;-).

I would not dare... :-)

@HanyzPAPU
Copy link
Collaborator

I’m curious about how this change will handle some of the uglier parts of the code I’ve written (mostly the parts with C macros). Perhaps it would be better to refactor these part so they are written more reasonably.

@lbulej
Copy link
Member
lbulej commented Nov 24, 2023

I’m curious about how this change will handle some of the uglier parts of the code I’ve written (mostly the parts with C macros). Perhaps it would be better to refactor these part so they are written more reasonably.

That's the plan after we clean up/unify/enforce formatting, so that refactoring is not mixed up with formatting changes.

@vhotspur vhotspur marked this pull request as ready for review January 8, 2024 18:43
@vhotspur
Copy link
Member Author
vhotspur commented Jan 8, 2024

I'm just asking for general permission to potentially chime in because I don't like how clang formats some of the things :-)

Now is the right time :-).

I think I have covered the most offensive parts (at least for me) and now the C style is enforced so things will only improve™.

Summary of changes

  • Unix endings (LF, EOF) and UTF-8 only
  • space-only indentation
  • braces around single-line statements (always)
  • #includes sorted

I would like to merge this before any further (functional) changes are made to prevent conflicts.

@vhotspur vhotspur merged commit 09a423f into master Jan 9, 2024
@vhotspur vhotspur deleted the topic/c-style branch January 13, 2024 09:41
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.

3 participants
0