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

Clang format #2211

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Clang format #2211

wants to merge 11 commits into from

Conversation

andrewhop
Copy link
Contributor

@andrewhop andrewhop commented Feb 21, 2025

Description of changes:

This PR has 3 commits that each do one thing:

  1. Add a script to check and fix clang-format issues
  2. Ignore clang-format issues in compiler_test
  3. Run fix on all the files

Callouts:

Why clang-format-17? Clang 18.1.* had breaking changes between releases and the version in GitHub runners is not the latest 18 release. This is an annoying developer setup because on Mac brew wants to install the latest version which has different opinions on code styling. For now the latest clang-format 17 is easily available in GitHub runners and brew. The actual difference between them is quite small.

https://github.com/actions/runner-images/blob/ubuntu24/20250209.1/images/ubuntu/Ubuntu2404-Readme.md

Testing:

There is a new CI test that ensures no formatting issues are introduced and if we update the .clag-format file they are applied

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@andrewhop andrewhop force-pushed the clang_format branch 4 times, most recently from 5e80dcf to dfa9796 Compare February 21, 2025 01:30
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 74.87437% with 350 lines in your changes missing coverage. Please review.

Project coverage is 78.91%. Comparing base (becf578) to head (f6805ce).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crypto/fipsmodule/bn/rsaz_exp_x2.c 0.00% 241 Missing ⚠️
crypto/fipsmodule/bn/exponentiation.c 25.00% 15 Missing ⚠️
crypto/bio/bio.c 64.10% 14 Missing ⚠️
crypto/decrepit/bio/base64_bio.c 0.00% 6 Missing ⚠️
crypto/evp_extra/evp_test.cc 94.91% 0 Missing and 6 partials ⚠️
crypto/compiler_test.cc 0.00% 4 Missing and 1 partial ⚠️
crypto/dsa/dsa_asn1.c 72.22% 5 Missing ⚠️
crypto/fipsmodule/bn/div.c 72.22% 5 Missing ⚠️
crypto/decrepit/cfb/cfb.c 50.00% 4 Missing ⚠️
crypto/err/err.c 63.63% 4 Missing ⚠️
... and 29 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2211      +/-   ##
==========================================
- Coverage   79.05%   78.91%   -0.14%     
==========================================
  Files         612      612              
  Lines      106218   106052     -166     
  Branches    15006    15011       +5     
==========================================
- Hits        83970    83692     -278     
- Misses      21595    21707     +112     
  Partials      653      653              

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

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.

2 participants