Re: [Dnsmasq-discuss] code style, decision

2019-09-12 Thread Kristoffel Pirard
My 5 cents:

1. It saved my team a lot of discussion when we enforced a code formatter
(e.g. clang-format).
2. 5 levels of indentation is way deeper than most humans can have in their
heads simultaneously - functions are a great tool to alleviate this.


On Thu, Sep 12, 2019 at 10:36 AM Dominik  wrote:

> If we change anything at all, we should not solely use tabspace.
>
> Imagine only when we're at level 5 in the code, this works mean 5*8=40
> (useless) indentation space before the actual code starts. This makes the
> code rather unreadable when editing with CLI tools like vim where there is
> typically less displaying slave available than in fancy IDE applications.
> Note that many editors jump back to the very beginning when there is an
> empty line.
>
> If at all, I'd vote for converting the existing tabstops to 8 spaces and
> keep the indentation step of 2 spaces per level.
>
> Best,
> Dominik
>
> >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
> >
> >___
> >Dnsmasq-discuss mailing list
> >Dnsmasq-discuss@lists.thekelleys.org.uk
> >http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style, decision

2019-09-12 Thread Jan Psota
> If at all, I'd vote for converting the existing tabstops to 8 spaces
> and keep the indentation step of 2 spaces per level.

As Simon wrote, it is unnecessary. He uses 2-space indentation, as I
can see, and every 8 spaces (32) are put with 1 tab (09). Nothing can
go wrong if only editor is set to sane 8-space tab.

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style, decision

2019-09-12 Thread Dominik
If we change anything at all, we should not solely use tabspace.

Imagine only when we're at level 5 in the code, this works mean 5*8=40 
(useless) indentation space before the actual code starts. This makes the code 
rather unreadable when editing with CLI tools like vim where there is typically 
less displaying slave available than in fancy IDE applications.
Note that many editors jump back to the very beginning when there is an empty 
line.

If at all, I'd vote for converting the existing tabstops to 8 spaces and keep 
the indentation step of 2 spaces per level.

Best,
Dominik

>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
>
>___
>Dnsmasq-discuss mailing list
>Dnsmasq-discuss@lists.thekelleys.org.uk
>http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style, decision

2019-09-11 Thread Geert Stappers
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

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-11 Thread Shota Hino
>
> With tab stops set to 8, a single tab or eight spaces are just alternate
> representations of the same thing, surely?


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. Hence, I
think this is a code style question request.


*Shota Hino*Connectivity Software
*m* 650-476-9668
*e* sh...@eero.com

*eero LLC *660 3rd St, 4th Floor
San Francisco, CA 94107



On Wed, Sep 11, 2019 at 2:49 PM Simon Kelley 
wrote:

> On 11/09/2019 22:12, Shota Hino wrote:
> > 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
>
> >
> >
> >
> > On Wed, Sep 11, 2019 at 2:05 PM Simon Kelley  > > wrote:
> >
> > 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.
> >
> > On 07/09/2019 18:21, john doe wrote:
> > > On 9/7/2019 6:25 PM, Shota Hino wrote:
> > >> Whatever the width of the tab is, converting all tabs to
> > whitespaces (or
> > >> the other way around) would be better.
> > >> If code formatting was forced at the time of each commit, there
> > would be no
> > >> need for anybody to set the tab width on their editor.
> > >> Consistent coding style will help more developers in the future.
> > >>
> > >>
> > >>
> > >
> > > 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.
> > >
> > > --
> > > John Doe
> > >
> > > ___
> > > Dnsmasq-discuss mailing list
> > > Dnsmasq-discuss@lists.thekelleys.org.uk
> > 
> > > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> > >
> >
> > ___
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss@lists.thekelleys.org.uk
> > 
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
>
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-11 Thread Simon Kelley
On 11/09/2019 22:12, Shota Hino wrote:
> 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

> 
> 
> 
> On Wed, Sep 11, 2019 at 2:05 PM Simon Kelley  > wrote:
> 
> 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.
> 
> On 07/09/2019 18:21, john doe wrote:
> > On 9/7/2019 6:25 PM, Shota Hino wrote:
> >> Whatever the width of the tab is, converting all tabs to
> whitespaces (or
> >> the other way around) would be better.
> >> If code formatting was forced at the time of each commit, there
> would be no
> >> need for anybody to set the tab width on their editor.
> >> Consistent coding style will help more developers in the future.
> >>
> >>
> >>
> >
> > 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.
> >
> > --
> > John Doe
> >
> > ___
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss@lists.thekelleys.org.uk
> 
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-11 Thread Shota Hino
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.



On Wed, Sep 11, 2019 at 2:05 PM Simon Kelley 
wrote:

> 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.
>
> On 07/09/2019 18:21, john doe wrote:
> > On 9/7/2019 6:25 PM, Shota Hino wrote:
> >> Whatever the width of the tab is, converting all tabs to whitespaces (or
> >> the other way around) would be better.
> >> If code formatting was forced at the time of each commit, there would
> be no
> >> need for anybody to set the tab width on their editor.
> >> Consistent coding style will help more developers in the future.
> >>
> >>
> >>
> >
> > 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.
> >
> > --
> > John Doe
> >
> > ___
> > Dnsmasq-discuss mailing list
> > Dnsmasq-discuss@lists.thekelleys.org.uk
> > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> >
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-11 Thread Simon Kelley
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.

On 07/09/2019 18:21, john doe wrote:
> On 9/7/2019 6:25 PM, Shota Hino wrote:
>> Whatever the width of the tab is, converting all tabs to whitespaces (or
>> the other way around) would be better.
>> If code formatting was forced at the time of each commit, there would be no
>> need for anybody to set the tab width on their editor.
>> Consistent coding style will help more developers in the future.
>>
>>
>>
> 
> 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.
> 
> --
> John Doe
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style, a wish

2019-09-07 Thread Geert Stappers
On Sat, Sep 07, 2019 at 09:25:25AM -0700, Shota Hino wrote:
> On Sat, Sep 7, 2019 at 8:11 AM Geert Stappers  wrote:
> > On Sat, Sep 07, 2019 at 10:41:34AM +0200, Dominik wrote:
> > > On Fri, 2019-09-06 at 22:09 -0700, Shota Hino wrote:
> > > > It seems the use of tabs are not consistent.
> > > > On some IDE, the lines are misaligned and very difficult to read.
> > > >
> > > > Could you please run code formatter?
> > > >
> > > Set your tab width to 8. With this setting, I'm not seeing
> > > inconsistencies in the dnsmasq codebase.
> >
> > :-)
> >
> >
> > The very same size of 8 characters for tab is documented
> > in the coding style of the Linux kernel.
> >
> > With
> >   wget
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
> > we could (and should) add coding style definition to this project.
> >
> > Main reason is ending discussion on coding style is
> > to get more time on discussion how and where to improve Dnsmasq.
> >
>
> Whatever the width of the tab is, converting all tabs to whitespaces (or
> the other way around) would be better.
> If code formatting was forced at the time of each commit, there would be no
> need for anybody to set the tab width on their editor.
> Consistent coding style will help more developers in the future.

Yes.

First the pain of the fight tabs versus N-spaces.
And because humans tend to avoid fight and pain, nothing will happen.

Please proof me wrong (on "nothing will happen")


Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread john doe
On 9/7/2019 6:25 PM, Shota Hino wrote:
> Whatever the width of the tab is, converting all tabs to whitespaces (or
> the other way around) would be better.
> If code formatting was forced at the time of each commit, there would be no
> need for anybody to set the tab width on their editor.
> Consistent coding style will help more developers in the future.
>
>
>

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.

--
John Doe

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread Kurt H Maier
On Sat, Sep 07, 2019 at 12:02:35AM -0700, Shota Hino wrote:
> http://uncrustify.sourceforge.net/ is one, but any reasonable code
> formatter should be able to replace leading white-spaces with tabs or vice
> versa.
> 
> I am surprised that nobody complained about this.

Consider focusing on the non-whitespace.  Your organization can run code
formatters on your internal release branches.  There isn't much benefit
to this bikeshedding for most developers.

khm

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread Shota Hino
Whatever the width of the tab is, converting all tabs to whitespaces (or
the other way around) would be better.
If code formatting was forced at the time of each commit, there would be no
need for anybody to set the tab width on their editor.
Consistent coding style will help more developers in the future.



On Sat, Sep 7, 2019 at 8:11 AM Geert Stappers  wrote:

> On Sat, Sep 07, 2019 at 10:41:34AM +0200, Dominik wrote:
> > On Fri, 2019-09-06 at 22:09 -0700, Shota Hino wrote:
> > > It seems the use of tabs are not consistent.
> > > On some IDE, the lines are misaligned and very difficult to read.
> > >
> > > Could you please run code formatter?
> > >
> > Set your tab width to 8. With this setting, I'm not seeing
> > inconsistencies in the dnsmasq codebase.
>
> :-)
>
>
> The very same size of 8 characters for tab is documented
> in the coding style of the Linux kernel.
>
> With
>   wget
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
> we could (and should) add coding style definition to this project.
>
> Main reason is ending discussion on coding style is
> to get more time on discussion how and where to improve Dnsmasq.
>
>
> Cheers
> Geert Stappers
>
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread Geert Stappers
On Sat, Sep 07, 2019 at 10:41:34AM +0200, Dominik wrote:
> On Fri, 2019-09-06 at 22:09 -0700, Shota Hino wrote:
> > It seems the use of tabs are not consistent.
> > On some IDE, the lines are misaligned and very difficult to read.
> > 
> > Could you please run code formatter?
> > 
> Set your tab width to 8. With this setting, I'm not seeing
> inconsistencies in the dnsmasq codebase.
 
:-)


The very same size of 8 characters for tab is documented
in the coding style of the Linux kernel.

With 
  wget 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/coding-style.rst
we could (and should) add coding style definition to this project.

Main reason is ending discussion on coding style is
to get more time on discussion how and where to improve Dnsmasq.


Cheers
Geert Stappers


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread Dominik
Set your tab width to 8. With this setting, I'm not seeing
inconsistencies in the dnsmasq codebase.

> In practice, settable tab stops were rather quickly replaced with
fixed tab stops, de facto standardized at every multiple of 8
characters horizontally [...]
https://en.wikipedia.org/wiki/Tab_key#Tab_characters

Best,
Dominik

On Fri, 2019-09-06 at 22:09 -0700, Shota Hino wrote:
> It seems the use of tabs are not consistent.
> On some IDE, the lines are misaligned and very difficult to read.
> 
> Could you please run code formatter?
> 
> 
> 
>   
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread M. Buecher
On 2019-09-07 09:02, Shota Hino wrote:

>> On Fri, Sep 06, 2019 at 10:09:51PM -0700, Shota Hino wrote:
>>> It seems the use of tabs are not consistent.
>>> On some IDE, the lines are misaligned and very difficult to read.
>>> 
>>> Could you please run code formatter?
>> 
>> Which code formatter have you in mind?
>> Does it have a default setting?
>> 
>> Groeten
>> Geert Stappers

> http://uncrustify.sourceforge.net/ is one, but any reasonable code formatter 
> should be able to replace leading white-spaces with tabs or vice versa. 
> 
> I am surprised that nobody complained about this.

I had got experience with astyle in some projects:
http://astyle.sourceforge.net/ 

Just my two cents
Maddes___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-07 Thread Shota Hino
http://uncrustify.sourceforge.net/ is one, but any reasonable code
formatter should be able to replace leading white-spaces with tabs or vice
versa.

I am surprised that nobody complained about this.





On Fri, Sep 6, 2019 at 11:42 PM Geert Stappers  wrote:

> On Fri, Sep 06, 2019 at 10:09:51PM -0700, Shota Hino wrote:
> > It seems the use of tabs are not consistent.
> > On some IDE, the lines are misaligned and very difficult to read.
> >
> > Could you please run code formatter?
>
> Which code formatter have you in mind?
> Does it have a default setting?
>
>
> Groeten
> Geert Stappers
> --
> Leven en laten leven
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] code style

2019-09-06 Thread Geert Stappers
On Fri, Sep 06, 2019 at 10:09:51PM -0700, Shota Hino wrote:
> It seems the use of tabs are not consistent.
> On some IDE, the lines are misaligned and very difficult to read.
> 
> Could you please run code formatter?

Which code formatter have you in mind?
Does it have a default setting?


Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] code style

2019-09-06 Thread Shota Hino
It seems the use of tabs are not consistent.
On some IDE, the lines are misaligned and very difficult to read.

Could you please run code formatter?
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss