Skip to content

spaces->tabs#389

Open
cmpwi wants to merge 1 commit into
gnustep:masterfrom
cmpwi:master
Open

spaces->tabs#389
cmpwi wants to merge 1 commit into
gnustep:masterfrom
cmpwi:master

Conversation

@cmpwi

@cmpwi cmpwi commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Consistency.

@davidchisnall

Copy link
Copy Markdown
Member

Recent versions of clang-format can now (finally!) handle the style used in this project (tabs for indentation, spaces for alignment), so I should probably start using it.

The config in CHERIoT RTOS is close to what I use here, but doesn’t have the Objective-C bits set. If you feel like adding them and adding a format check CI job, that would be very helpful.

@cmpwi

cmpwi commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

You're referring to this file: https://github.com/CHERIoT-Platform/cheriot-rtos/blob/main/.clang-format, right?

I've never actually used clang-format before, but I'm more than willing to learn. I'll take a look after the sun goes up in my timezone (what is sleep?) and try some experiments on my own code so I don't turn yours into mojibake. After that, I'll figure out how to wire it into the CI system.

@davidchisnall

Copy link
Copy Markdown
Member

You're referring to this file: https://github.com/CHERIoT-Platform/cheriot-rtos/blob/main/.clang-format, right?

Yup.

I've never actually used clang-format before, but I'm more than willing to learn. I'll take a look after the sun goes up in my timezone (what is sleep?) and try some experiments on my own code so I don't turn yours into mojibake. After that, I'll figure out how to wire it into the CI system.

The cheriot-rtos repo also has a CI job that does the formatting, so we can probably largely copy that one. It basically runs clang-format, then runs git diff and, if there is a diff, fails and reports the error.

Running it on (a copy of) the code in this repo is a good idea because git diff will show you how close the output is to the existing style. Hopefully you can get it to the point where the changes are all places where I haven't been consistent in applying the style here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants