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

project: remove clang-format for good #772

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

F1F7Y
Copy link
Member

@F1F7Y F1F7Y commented Aug 25, 2024

Removes clang-format and replaces it with a code standards document. Doesn't format any files.

First commit (8a4948e) is the important change.

Second commit(2f02a69) just removes all the clang-format comments.

@F1F7Y F1F7Y added the feedback wanted Feedback is wanted whether the changes by this PR are desired label Aug 25, 2024
Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My take on this is that we should definitely have the code standard documentation merged ASAP but I disagree with with removing clang-format.

If the formatting is shit (it is), the clang-format config should be adjusted instead. Maybe we could find the settings that are close / the same as valve source engine so that comparing diffs is easier?

@GeckoEidechse
Copy link
Member

In fact, @F1F7Y can you make a PR with just the code standards and I'll merge it ASAP.
(Alternatively I'll make it but then I'll get co-author on it hehe :P)

@F1F7Y
Copy link
Member Author

F1F7Y commented Aug 25, 2024

My take on this is that we should definitely have the code standard documentation merged ASAP but I disagree with with removing clang-format.

If the formatting is shit (it is), the clang-format config should be adjusted instead. Maybe we could find the settings that are close / the same as valve source engine so that comparing diffs is easier?

My take on it is if we remove all the annoying settings from clang-format we're just left with a glorified .editorconfig. If we want programmers to format the code the way we want we should format the code base so they have good reference. Just trying to perfect configs doesn't help.

@F1F7Y
Copy link
Member Author

F1F7Y commented Aug 25, 2024

To expand on it a little more when I write code I try to format it the same as the codebase. PRs having shit formatting isn't caused by the lack of auto formatting but rather by the lack of a well formatted codebase ( and written down rules :3 ).

You could argue that just making clang format less strict would work, which it partially would, but I'd argue at that point it just becomes an annoyance. I don't care whether you put a space after an if statement, I care that you wrote readable code with good names and documentation and clang format can't enforce that.

@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback wanted Feedback is wanted whether the changes by this PR are desired merge conflicts Blocked by merge conflicts, waiting on the author to resolve
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants