clang-format Style for RTEMS

Mikail Yayla myayla1245 at
Sun Jan 13 21:36:45 UTC 2019


to evaluate the effort needed to adapt clang-format for RTEMS, we are
currently trying to implement the option to put the ")" at the
end of a function declaration in a separate line, e.g.:

bool _Thread_Initialize(
   Thread_Information                   *information,
   Objects_Name                          name
) // <- in a new line

I asked for help in the clang mailing list, but it does not seem like there
is a person who is willing to mentor me in getting used to the clang-format
code and the tools it depends on. It looks like they don't have much
interest to invest time in a private patch.

Currently I am using QtCreator to load the LLVM cmake and build the
project. It is possible to use the Debugger to trace the execution of

In my view, with the help of QtCreator and the debugger it should be
possible to adapt clang-format for RTEMS in a reasonable amount of time.
But since it is an extensive project, it will take some time to understand
the code and to feel comfortable enough to implement new functionality.


On Mon, Dec 17, 2018 at 1:44 PM Sebastian Huber <
sebastian.huber at> wrote:

> Hello Mikail,
> thanks for your summary. I tried a couple for C code formatters for
> RTEMS in the last couple of years and none delivered sufficiently good
> results. My hope was that we could use clang-format with some additions
> for RTEMS. However, it seems the hurdle to add new style options to
> clang-format is quite high:
> "The goal of the clang-format project is more on the side of supporting
> a limited set of styles really well as opposed to supporting every
> single style used by a codebase somewhere in the wild. Of course, we do
> want to support all major projects and thus have established the
> following bar for adding style options. Each new style option must ..
>       * be used in a project of significant size (have dozens of
>         contributors)
>       * have a publicly accessible style guide
>       * have a person willing to contribute and maintain patches"
> I am not sure if RTEMS would count as a project of "significant size".
> See also:
> --
> Sebastian Huber, embedded brains GmbH
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at
> PGP     : Public key available on request.
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list