Uncrustify Configuration vs RTEMS Coding Style
Joel Sherrill
joel at rtems.org
Mon Apr 5 15:25:48 UTC 2021
On Mon, Apr 5, 2021 at 9:51 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> Hello Joel,
>
> On 04/04/2021 22:19, Joel Sherrill wrote:
> > Hi Sebastian,
> >
> > Do you have a list or remember where uncrustify could not match the
> > RTEMS Coding Style?
>
> my uncrustify had 742 options and I didn't manage do find an option set
> which produces the RTEMS Coding Style. I think using options to define a
> source code formatter behaviour is broken by design. You probably need
> some sort of a Turing complete domain-specific language for this.
>
> I tried to write a configuration file for clang-format 10. It worked
> well until I discovered this broken option:
>
>
> https://stackoverflow.com/questions/38392889/clang-format-align-asterisk-of-pointer-declaration-with-variable-name
>
> What we need for the RTEMS style is:
>
> AlignConsecutiveDeclarations: true
>
> PointerAlignment: Right
>
> This combination seems to be unimplemented properly since 2016.
>
> It seems there is still no tool available which is able to produce
> something close to the RTEMS style.
>
Which do you think is closer? Any hunch? Or which was better in
your experience?
I don't expect a tool to be perfect. I expected there to be some give
and take between changing our style and changing the tool.
--joel
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax: +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210405/f05c8e6c/attachment-0001.html>
More information about the devel
mailing list