On 05/04/2021 17:25, Joel Sherrill wrote:



On Mon, Apr 5, 2021 at 9:51 AM Sebastian Huber <sebastian.hu...@embedded-brains.de <mailto:sebastian.hu...@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
    
<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.

I would use clang-format since this tool is used by some large projects. For an example please have a look at:

https://lists.rtems.org/pipermail/devel/2021-April/066311.html

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@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/

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to