Re: [hatari-devel] Proposal to introduce a configuration for a code formatting tool |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Am Donnerstag, den 15.12.2011, 18:10 +0100 schrieb Nicolas Pomarède:
> Le 15/12/2011 17:58, Matthias Arndt a écrit :
> > Am Donnerstag, den 15.12.2011, 17:46 +0100 schrieb Nicolas Pomarède:
>
> > I personally think that it helps a lot of files always have the same
> > look and feel. I don't intend to touch all parts of the code so it can
> > be fine for me.
>
> I agree for new files, for old files, seeing the few number of people
> that work on them and the fact that indenting is not that bad anyway, I
> think it's ok to keep it this way.
>
> >
> > Seeing the "existing style" is sometimes very hard to see. I even think
> > the whole code was formatted to 4 spaces already. At least that aligned
> > okaish in Code::Blocks.
> >
>
> Most code uses 'tab' in hatari, so setting tab=4 or 8 spaces in your IDE
> will keep it aligned, you won't realise the difference.
>
> The problem is that in some part of your patch (open it with vim for
> example), the tabs were exported as spaces instead of real tab. And tabs
> were replaced by 4 spaces, hence the indenting problem when pushing it
> to Hatari's tree.
>
> Check that your IDE has an option to automatically convert consecutives
> spaces to tabs, so they're exported as tabs later (and use 8 spaces per
> tab for Hatari, that the setting everywhere)
Yes, I now see that the files are indented with TABs and not spaces,
however I setup my IDE to use spaces instead of TABs. For strange
reasons, people seem unable to agree what's better. Most opinions go for
"spaces instead of TAB", I personally preferred TAB for years aswell.
But this leads back to the original proposal, having a defined standard
that can be applied before commit will resolve this at ease.
I will make a test and create a test configuration for astyle and see
how large the differences are if applied to most .c files in Hatari.
>
> Nicolas
Matthias
--
Matthias Arndt <marndt@xxxxxxxxxxxxxx>
PGP-Key: http://www.final-memory.org/files/marndt.asc
Jabber: simonsunnyboy@xxxxxxxxxxxxxxxx