Skip to content

Conversation

@jk-ozlabs
Copy link
Member

This changeset introduces a .clang-format definition (and a couple of suppressions), applies the format and adds a CI check for formatting.

The format is heavily based on the Linux kernel style; something we have aimed to roughly adhere to, but there are still divergences in the codebase.

Add a .clang-format, heavily based on the Linux kernel definitions.

We only include src/, as lib/ contains imported sources, and we would
prefer minimal divergence from their upstream.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
ninja -C obj clang-format, with clang-format-19.

No other changes

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Now that we have formatted tree-wide, use meson's clang-format-check
target to ensure no format regressions.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
@jk-ozlabs jk-ozlabs mentioned this pull request Jul 3, 2025
@jk-ozlabs jk-ozlabs merged commit 9c5f51d into main Jul 4, 2025
2 checks passed
@jk-ozlabs jk-ozlabs deleted the pr/format branch July 9, 2025 08:08
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