Tabs in Source Files [C, H]

Joel Sherrill joel at rtems.org
Wed Aug 7 14:24:51 UTC 2019


On Wed, Aug 7, 2019 at 8:59 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> ----- Am 7. Aug 2019 um 15:41 schrieb joel joel at rtems.org:
>
> > Hi
> >
> > While looking at assembly language formatting, I decided to grep for tabs
> > in source
> > files. In cpukit and testsuites, there are a LOT of files with tabs.
> >
> > $ find cpukit testsuites/ -name "*.[ch]" | xargs -e grep -rlP "\t" | grep
> > -v libnetworking | grep -v pppd | grep -v contrib | wc -l
> > 530
> >
> > That may be picking up a few extra files but that's still a lot of files.
> >
> > Any comments?
>
> My approach to white space in source files would be to pick up the best
> source code formatter available, select a configuration which fits best to
> the existing style, run it over the code (excluding code which we want to
> keep in synchronization with an upstream) and later run every commit
> through it.
>

I'm not disagreeing with you but no one has ever found a formatter and
defined a style that matches.

--joel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190807/9f3d8cf6/attachment-0002.html>


More information about the devel mailing list