<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 11:06 AM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Sep 11, 2020 at 1:41 AM Sebastian Huber<br>
<<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>> wrote:<br>
><br>
> On 10/09/2020 17:32, Joel Sherrill wrote:<br>
><br>
> ><br>
> ><br>
> > On Thu, Sep 10, 2020 at 10:24 AM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a><br>
> > <mailto:<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>>> wrote:<br>
> ><br>
> >     On Mon, Sep 7, 2020 at 12:06 AM Sebastian Huber<br>
> >     <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
> >     <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>> wrote:<br>
> >     ><br>
> >     > Hello,<br>
> >     ><br>
> >     > I think we waste too much time to address coding style issues on<br>
> >     newly<br>
> >     > contributed code, for example GSoC. I don't know a source code<br>
> >     > formatting tool which supports the RTEMS coding style and I<br>
> >     think it is<br>
> >     > not worth the time to write and maintain such a tool<br>
> >     specifically for<br>
> >     > RTEMS. Why don't we simply allow an alternative coding style<br>
> >     which has a<br>
> >     > good code formatter for new source files? I don't propose to<br>
> >     reformat<br>
> >     > the existing files.<br>
> >     ><br>
> >     > I would simply pick up one of the standard styles supported by<br>
> >     > clang-format and declare it as an acceptable coding style for RTEMS.<br>
> ><br>
> ><br>
> > I am not willing to blanket accept another project's coding style.<br>
> ><br>
> > I am willing to accept a configuration for a tool that is close to our<br>
> > style and<br>
> > make compromises on specific points.<br>
><br>
> We had a student to figure this out for clang-format some time ago:<br>
><br>
> <a href="https://lists.rtems.org/pipermail/devel/2019-February/024912.html" rel="noreferrer" target="_blank">https://lists.rtems.org/pipermail/devel/2019-February/024912.html</a><br>
><br>
> We could also have a look at uncrustify:<br>
><br>
> <a href="https://github.com/uncrustify/uncrustify" rel="noreferrer" target="_blank">https://github.com/uncrustify/uncrustify</a><br>
><br>
> It seems to be still actively maintained on Github.<br>
><br>
> ><br>
> > I also think when doing this we should consider things that we do that<br>
> > we have since learned safety standards don't like such as single statement<br>
> > if's without braces. I think we should have braces now.<br>
> I think uncrustify had options to do this. I am not sure if clang-format<br>
> can do this.<br>
> ><br>
> > This is best viewed as an opportunity to improve but comes with changes<br>
> > since I don't think any of us wants to add a few more configuration<br>
> > options<br>
> > to any formatter. Although if we get close, I can see adding those as open<br>
> > projects if someone is interested.<br>
> Good, I think we should have a look at uncrustify. The RTEMS coding<br>
> style is too exotic for clang-format.<br>
<br>
Let's start with uncrustify. The github looks solid with<br>
cross-platform compatibility claims (*nix, Windows, OSX).<br>
<br>
I know that there was an RTEMS style script generated by Sebastian<br>
some time ago. We had it on the wiki forever, but now it is a broken<br>
link in the docs<br>
<a href="https://devel.rtems.org/attachment/wiki/Developer/Coding/Conventions/rtems.uncrustify" rel="noreferrer" target="_blank">https://devel.rtems.org/attachment/wiki/Developer/Coding/Conventions/rtems.uncrustify</a><br>
<br>
from <a href="https://docs.rtems.org/branches/master/eng/coding-conventions.html#tools" rel="noreferrer" target="_blank">https://docs.rtems.org/branches/master/eng/coding-conventions.html#tools</a><br>
<br>
So we'll need to revive that first, and iterate.<br></blockquote><div><br></div><div>Amar has backups of the old wiki based on wikipedia and I think he can</div><div>access it easily.</div><div><br></div><div>--joel </div></div></div>