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 .clang-format file #10308

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

Conversation

ericcurtin
Copy link
Contributor

@ericcurtin ericcurtin commented Nov 15, 2024

So people can use things like clang-format and git clang-format to style their code. Copied from ggml-cann, with PointerAlignment changed to Middle.

So people can use things like clang-format and git clang-format to
style their code. Copied from ggml-cann, with PointerAlignment
changed to Middle.

Signed-off-by: Eric Curtin <[email protected]>
@ericcurtin ericcurtin mentioned this pull request Nov 15, 2024
4 tasks
@ericcurtin
Copy link
Contributor Author

Example of PR styled with this .clang-format file:

#10291

.clang-format Outdated Show resolved Hide resolved
Co-authored-by: Georgi Gerganov <[email protected]>
Signed-off-by: Eric Curtin <[email protected]>
Copy link
Owner

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

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

This should be a good starting point for .clang-format - we can iterate over it on master. @slaren wdyt?

@slaren
Copy link
Collaborator

slaren commented Nov 16, 2024

I am not convinced that this is any better than starting from scratch. I may spend time on the next days trying to make one that we can use on every file, it would save a lot of time and fix all the minor formatting inconsistencies that are present in nearly every PR from new contributors.

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