[Dnsmasq-discuss] code style, decision

Geert Stappers stappers at stappers.nl
Thu Sep 12 07:01:45 BST 2019


On Wed, Sep 11, 2019 at 03:09:31PM -0700, Shota Hino wrote:
> On Wed, Sep 11, 2019 at 2:49 PM Simon Kelley wrote:
> > On 11/09/2019 22:12, Shota Hino wrote:
> > > On Wed, Sep 11, 2019 at 2:05 PM Simon Kelley wrote:
> > > > On 07/09/2019 18:21, john doe wrote:
> > > > >   some earlier postings:
> > > > > >   ....
> > > > >
> > > > > I agree, consistent code is best, clear guideline could be
> > > > > usefull for new code.
> > > > >
> > > > > Simon Kelley, the belligerent dictator of the Dnsmasq project
> > > > > will need to way in on such changes though.
> > > >
> > > > There seems to be confusion here between code style, and code
> > > > representation.
> > > >
> > > > Code style, ie layout, indent width, is not negotiable.
> > > >
> > > > Code representation is the use of tab characters at 8-character
> > > > stops.  If your IDE or other device doesn't use 8 characher
> > > > stops, it will mangle code. That doesn't mean the code is badly
> > > > formatted, it means your display method is incompatible.
> > > >
> > > > It's quite possible to get around this by running expand on
> > > > every commit, so that only spaces are used in the repo. It's even
> > > > possible to run expand on every existing file, at the expense of
> > > > polluting the logs.  I don't think there are any other downsides
> > > > to this.
> > > >
> > > > Or people could  configure IDEs and editors to use sane tab stops.
> > > >
> > > > Cheers,
> > > >
> > > > Simon.
> > > >
> > > How do you feel about the mix usage of tab and leading white spaces?
> > > The code is mangled because some liens use a tab and some use white spaces.
> > > I do not think the choice of tab vs white spaces is code representation.
> >
> > With tab stops set to 8, a single tab or eight spaces are just alternate
> > representations of the same thing, surely?
> >
> >
> > Simon
> >
> 
> Yes.
> 
> But what I am asking in this thread is to use either tabs or white spaces
> (not both).
> If only one is used, the width of tab in IDE does not matter.

Now it waits for a decision.

With which character should the code be indented?


Regards
Geert Stappers



More information about the Dnsmasq-discuss mailing list