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

Enforce clang-format for C source files #1177

Merged
merged 4 commits into from
Sep 18, 2024
Merged

Enforce clang-format for C source files #1177

merged 4 commits into from
Sep 18, 2024

Conversation

rafaelroquetto
Copy link
Contributor

@rafaelroquetto rafaelroquetto commented Sep 18, 2024

  • Do a clang-format pass on existing C source files to bring them to a baseline
  • Provide a git pre-commit hook that automatically runs clang-format on staged C/C++ files
  • Provide a github workflow to enforce modified C files are up to standard
  • Regenerate eBPF binaries to ensure tests passes and that they are matching the new baseline

This PR is better reviewed on a per commit basis

Hint: use git diff|blame -w to ignore whitespace when comparing across revisions.

@rafaelroquetto rafaelroquetto changed the title WIP: Clang format Enforce clang-format for C source files Sep 18, 2024
@rafaelroquetto rafaelroquetto marked this pull request as ready for review September 18, 2024 18:26
@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.20%. Comparing base (3fc48aa) to head (168e8b4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1177      +/-   ##
==========================================
+ Coverage   81.16%   81.20%   +0.03%     
==========================================
  Files         136      136              
  Lines       11447    11447              
==========================================
+ Hits         9291     9295       +4     
+ Misses       1631     1628       -3     
+ Partials      525      524       -1     
Flag Coverage Δ
integration-test 57.01% <ø> (-0.04%) ⬇️
k8s-integration-test 58.87% <ø> (+0.13%) ⬆️
oats-test 35.81% <ø> (ø)
unittests 53.57% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Nice!

@rafaelroquetto rafaelroquetto merged commit f71ed30 into main Sep 18, 2024
10 checks passed
@rafaelroquetto rafaelroquetto deleted the clang-format branch September 18, 2024 19:40
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