Re: [Dnsmasq-discuss] code improvement WAS: code style
What about "indent -kr" style? In 16x9 monitor era let's not talk about 4-space long tabs, please :-) (I actually use old 17" CRT, which I like, but I'm still sure that indentation should rely on ASCII 09 - tab character) ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] code improvement WAS: code style
On Sat, Sep 07, 2019 at 07:35:09PM +0200, Geert Stappers wrote: > > What the f? > > Asking for consistent code style is NOT "bikeshedding". > Please either ignore a request for change OR encourage it. This is an editor configuration matter. Demanding minor whitespace adjustments en masse without even offering to send a patch is mere whining, not any productive action. It's up to Simon, but I recommend ignoring it or at most documenting the recommended tabstop settings. khm ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] code improvement WAS: code style
On Sat, Sep 07, 2019 at 10:05:33AM -0700, Kurt H Maier wrote: > 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. What the f? Asking for consistent code style is NOT "bikeshedding". Please either ignore a request for change OR encourage it. We, this mailinglist, have no clue how much code improvements we missed due lack of code style. So whenever a First Time Poster asks for guidance on spaces versus tabs, be aware that F.T.P. made some effort to look at the source code. Consider that her/his reason was a need for modification. A modification you not yet know you want. Groeten Geert Stappers -- Leven en laten leven signature.asc Description: PGP signature ___ 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
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
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
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
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
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
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
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
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
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