[Toybox] [PATCH] Whitespace: remove tabs from indentation.

enh enh at google.com
Thu Jan 24 08:02:02 PST 2019


that's what i meant about "you have to learn to give up control over
every last space or tab". many Google and Android projects use
clang-format, perhaps helped by the fact that no-one really loves
https://google.github.io/styleguide/cppguide.html but everyone has far
better things to do than waste more time arguing with their neighbor
about indentation.

(the only exception is the odd table of data where there's an attempt
to make it more human-readable, but  that's just a few `clang-format
on/off` comments in hundreds of thousands of lines of code. i've
certainly not seen anyone do what that systemd bug talks about and
turn off formatting just so they can write an over-long line. that
wouldn't make it through code review anyway, unless everyone agrees in
a longer line length, in which case just fix your .clang-format file
so the tool knows what your max line length is.)

On Thu, Jan 24, 2019 at 1:03 AM Reverend Homer <mk.43.ecko at gmail.com> wrote:
>
> Yeah, that's an option. But AFAICS according to my experience every project
> tried to use it had some issues. The latest example I have is systemd:
> https://github.com/systemd/systemd/pull/11308
>
> You can look through this PR and see how much trouble it creates.
>
> R.H.
>
> On 23/01/2019 21:07, enh wrote:
> > personally i'd like to have a .clang-format and a git hook to just
> > canonicalize. it takes a bit of getting used to, giving up the fine
> > control over every last space and linebreak, but it's remarkably
> > liberating once you've done it. in projects like that i just run
> > clang-format every time i save and literally pay no attention to the
> > layout of what i'm typing, allowing ctrl-S to think about it so i
> > don't have to.
> >
> > On Wed, Jan 23, 2019 at 12:46 AM Reverend Homer <mk.43.ecko at gmail.com> wrote:
> >>
> >> Maybe it's worth adding .editorconfig file? Pretty much all editors support it
> >> from the box or have the plugin.
> >>
> >> R.H.
> >>
> >> On 23/01/2019 05:23, enh via Toybox wrote:
> >>> I accidentally added a tab in xargs.c, so as penance I'll clean up all
> >>> the tabs.
> >>> ---
> >>>    toys/pending/dhcp.c     |  2 +-
> >>>    toys/pending/dhcp6.c    |  4 ++--
> >>>    toys/pending/ip.c       |  2 +-
> >>>    toys/pending/mdev.c     |  6 +++---
> >>>    toys/pending/modprobe.c | 15 +++++++--------
> >>>    toys/posix/xargs.c      |  2 +-
> >>>    6 files changed, 15 insertions(+), 16 deletions(-)
> >>>
> >>>
> >>> _______________________________________________
> >>> Toybox mailing list
> >>> Toybox at lists.landley.net
> >>> http://lists.landley.net/listinfo.cgi/toybox-landley.net
> >>>
> >> _______________________________________________
> >> Toybox mailing list
> >> Toybox at lists.landley.net
> >> http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list