Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(binding/C): add clang-format for c binding #2003

Merged
merged 5 commits into from
Apr 15, 2023

Conversation

xyjixyjixyji
Copy link
Contributor

@xyjixyjixyji xyjixyjixyji commented Apr 15, 2023

  • add make format to format all .c and .h file
  • add google style clang-format for default formatting

Fixed: #1992

Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
* Format all C source code and headers using clang-format

Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
@xyjixyjixyji
Copy link
Contributor Author

xyjixyjixyji commented Apr 15, 2023

Just two quick questions, 1. do we need format-check and 2. do we need apache license header in our .clang-format?

@suyanhanx
Copy link
Member

do we need format-check

When we enable CI for the c binding, we can add it.

do we need apache license header in our .clang-format?

If this file can have comments, please do so.

@xyjixyjixyji
Copy link
Contributor Author

The licence header is added now. Then the format check should be done in future PRs related to binding CI. 😄

* Remove the space of assigning envvar in Makefile
* Add `make format` command to format all "*.c" and ".h"
  file under the c binding directory

Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
Signed-off-by: Ji-Xinyou <jerryji0414@outlook.com>
Copy link
Member

@PsiACE PsiACE left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks

@PsiACE PsiACE merged commit 7525ccd into apache:main Apr 15, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang format for C binding files
4 participants