New coding style for new files?

Gedare Bloom gedare at rtems.org
Thu Sep 10 15:23:52 UTC 2020


On Mon, Sep 7, 2020 at 12:06 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Hello,
>
> I think we waste too much time to address coding style issues on newly
> contributed code, for example GSoC. I don't know a source code
> formatting tool which supports the RTEMS coding style and I think it is
> not worth the time to write and maintain such a tool specifically for
> RTEMS. Why don't we simply allow an alternative coding style which has a
> good code formatter for new source files? I don't propose to reformat
> the existing files.
>
> I would simply pick up one of the standard styles supported by
> clang-format and declare it as an acceptable coding style for RTEMS.
> Then students can pipe their code through it before they send it for
> review. This helps to concentrate on the important things to review and
> not the white space.
>
This will work best in combination with a patch management/review
system that can run the style checker and report which style it
passes.

For me, I definitely spend too much time pointing out style problems.
Often I just do that before I will even think through the logic. But
that is wasting a lot of time. I would be happy to see a path toward
style-proved submissions.

I know we discussed this topic a few times before. I think there was
even a couple of close style matches found or suggested. I'm open to
the discussion.

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


More information about the devel mailing list