Skip to content

Apply clang formatting check to all PRs#1839

Closed
weebl2000 wants to merge 2 commits into
meshcore-dev:devfrom
weebl2000:clang-format-ci
Closed

Apply clang formatting check to all PRs#1839
weebl2000 wants to merge 2 commits into
meshcore-dev:devfrom
weebl2000:clang-format-ci

Conversation

@weebl2000
Copy link
Copy Markdown
Contributor

@weebl2000 weebl2000 commented Feb 25, 2026

I saw there was a clang formatting file. I've added a github workflow that enforces all PRs conform to the clang format file. In a second commit I've applied all clang formatting changes required by the clang format.

This will most likely cause an insane amount of conflicts with all open PRs. Feel free to close if it's not desired at this point in time.

Most dangerous of all it might re-order includes in a breaking fashion, but as far as I can see it all still works in current dev branch.

Benefit: any open PRs not updated by author will stand out as not having their code updated to apply the formatting.

All changes to any source files are pure formatting.

Add GitHub Actions workflow that checks clang-format on PRs to main/dev.
Only checks changed .cpp/.h/.c files, excludes lib/, and shows diffs on
failure. Fix AlignEscapedNewlines value from LeftWithLastLine (unsupported
in clang-format 18) to Left.
Run clang-format on all .cpp/.h/.c files in src/, examples/, and
variants/ to establish baseline compliance. Primarily re-indents
variants/ from 4-space to 2-space to match project .clang-format config.
@liamcottle
Copy link
Copy Markdown
Member

Hey, thanks.

Yeah, unfortunately this is too invasive, it will cause merge conflicts with the in progress multi-byte-paths branch, and as you mentioned:

This will most likely cause an insane amount of conflicts with all open PRs. Feel free to close if it's not desired at this point in time.

So I'll close this one out for now :)

@liamcottle liamcottle closed this Feb 25, 2026
@weebl2000
Copy link
Copy Markdown
Contributor Author

Hey, thanks.

Yeah, unfortunately this is too invasive, it will cause merge conflicts with the in progress multi-byte-paths branch, and as you mentioned:

This will most likely cause an insane amount of conflicts with all open PRs. Feel free to close if it's not desired at this point in time.

So I'll close this one out for now :)

👍🏽 let me know if you want to revisit this - I can put some effort into rebasing outstanding PRs that will have formatting affected to make sure the changes still appear readable to humans 🤖 heh.

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