Skip to content

Conversation

@Jorropo
Copy link
Member

@Jorropo Jorropo commented Jan 2, 2026

The previous setup would be extremely lenient.
AFAIK would basically only enforce tabulation more or less.

Add a .clang-format file, the point is you can't accidently have whitespace changes. See #9116 for what sitatuation we are in before this patch.

The point is there is a single valid way to format the file, and running trunk fmt -a will bring you to it.

@Jorropo
Copy link
Member Author

Jorropo commented Jan 2, 2026

In VC @thebentern pointed out this is a big merge conflicts risk.

I agree, however it is easy to fix.
If a conflict happen you can copy the .clang-format file from my PR, run trunk fmt -a, commit then merge this PR into your branch and the conflict should go away.

@thebentern thebentern added the enhancement New feature or request label Jan 2, 2026
@Jorropo Jorropo force-pushed the clang-format branch 3 times, most recently from 53547e1 to d2e2c28 Compare January 3, 2026 01:49
The previous setup would be extremely lenient.
AFAIK would basically only enforce tabulation more or less.

Add a .clang-format file, the point is you can't accidently have whitespace changes.
See meshtastic#9116 for what sitatuation we are in before this patch.

The point is there is a single valid way to format the file,
and running trunk fmt -a will bring you to it.
@thebentern thebentern merged commit 0d11331 into meshtastic:develop Jan 3, 2026
75 checks passed
@Jorropo Jorropo deleted the clang-format branch January 3, 2026 20:23
NomDeTom pushed a commit to NomDeTom/MeshtasticFirmware that referenced this pull request Jan 4, 2026
Jorropo added a commit to Jorropo/firmware that referenced this pull request Jan 4, 2026
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.

I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into master.

I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.

This reverts commit 0d11331.
Jorropo added a commit to Jorropo/firmware that referenced this pull request Jan 4, 2026
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.

I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.

I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.

This reverts commit 0d11331.
thebentern pushed a commit that referenced this pull request Jan 4, 2026
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.

I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.

I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.

This reverts commit 0d11331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants