RTEMS | Reformat cpukit rtems src (!237)

Gedare Bloom (@gedare) gitlab at rtems.org
Mon Sep 23 23:11:14 UTC 2024



Gedare Bloom created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/237

Project:Branches: gedare/rtems:reformat-cpukit-rtems-src to rtems/rtos/rtems:main
Author:   Gedare Bloom




## Summary

This is a first attempt at automatic formatting using `clang-format`. I'm working on making the build of `clang-format` necessary to recreate this formatter part of RSB. At the moment it requires building the llvm-project.git with some extra patches that are pending acceptance to the upstream.

Please provide feedback especially on undesirable changes.

A few notes:
* return statements are now aligned with the space character after `return`. This is a default behavior of `clang-format` and seems unnecessary to change, but it does result in quite a few whitespace changes.
* we have a mix of `[]` and [ ]` without and with spaces. I decided to go with spaces, as there seemed to be fewer changes that way. It is also more in-line with the prevailing rtems style that encourages more horizontal spacing.

I'm not sure the best timing, but I think we should try to make these changes at/near the release point, either before or after it.

I rebuilt and tested using `erc32-sis` and `leon3-sis` (SMP). 

<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/237
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240923/f641a34d/attachment-0001.htm>


More information about the bugs mailing list