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 3 commits into
base: main
Choose a base branch
from
Draft

Clang format #2211

wants to merge 3 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 7 times, most recently from 0e13499 to 5afa0ae Compare February 21, 2025 07:41
@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.05%. Comparing base (db713ea) to head (0f214ad).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2211      +/-   ##
==========================================
- Coverage   79.06%   79.05%   -0.02%     
==========================================
  Files         611      611              
  Lines      106351   106352       +1     
  Branches    15038    15038              
==========================================
- Hits        84085    84074      -11     
- Misses      21615    21625      +10     
- Partials      651      653       +2     

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

@hanno-becker
Copy link
Contributor

@andrewhop Is it possible to have sub-trees use a separate clang-format? Asking for mlkem-native.

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