From: "Daniel Xu" <dxu@dxuuu.xyz>
To: "Qu Wenruo" <quwenruo.btrfs@gmx.com>, <dsterba@suse.cz>,
<linux-btrfs@vger.kernel.org>, <kernel-team@fb.com>
Subject: Re: [PATCH v2] btrfs-progs: Add basic .editorconfig
Date: Tue, 28 Jul 2020 10:26:58 -0700 [thread overview]
Message-ID: <C4IFM8SN79ND.2BH0DOVF4VXEG@maharaja> (raw)
In-Reply-To: <0b039506-577f-05a1-2109-565e8c5c2a04@gmx.com>
On Tue Jul 28, 2020 at 6:00 AM PDT, Qu Wenruo wrote:
>
>
> On 2020/7/28 下午8:57, David Sterba wrote:
> > On Tue, Jul 28, 2020 at 08:12:40PM +0800, Qu Wenruo wrote:
> >>>>> +trim_trailing_whitespace = true
> >>>>
> >>>> Does this setting apply on lines that get changed or does it affect the
> >>>> whole file? If it's just for the lines, then it's what we want.
> >>>>
> >>> At least from the vim plugin code, it's just for the new lines:
> >>>
> >>> https://github.com/editorconfig/editorconfig-vim/blob/0a3c1d8082e38a5ebadcba7bb3a608d88a9ff044/plugin/editorconfig.vim#L494
> >>>
> >>> It just call the replace on the current line.
> >>
> >> My bad, %s, it replaces all existing lines...
> >
> > So this would introduce unrelated changes, but it seems that we don't
> > have much trailing whitespaces in progs codebase:
> >
> > $ git grep '\s\+$'
> > btrfs-fragments.c:
> > btrfs-fragments.c: black = gdImageColorAllocate(im, 0, 0, 0);
> > crypto/crc32c.c:/*
> > crypto/crc32c.c: *
> > crypto/crc32c.c: * Software Foundation; either version 2 of the License, or (at your option)
> > crypto/crc32c.c: * Steps through buffer one byte at at time, calculates reflected
> > crypto/crc32c.c: * Steps through buffer one byte at at time, calculates reflected
> > kernel-lib/radix-tree.h: *
> > kernel-lib/radix-tree.h: *
> > kernel-lib/rbtree.c: node = node->rb_right;
> > kernel-lib/rbtree.c: node = node->rb_left;
> > kernel-lib/rbtree.h:
> >
> > filtering only the sources. So let's keep it in the config.
> >
> Great.
>
> BTW, it would be better to mention we use editorconfig as the unified
> formatting config.
>
> As most of us are using vim, which doesn't support editorconfig by
> default, thus we need to install that plugin manually.
Sure, should a hint about editorconfig go into the `Development` section
of the README.md?
next prev parent reply other threads:[~2020-07-28 17:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 1:57 [PATCH v2] btrfs-progs: Add basic .editorconfig Daniel Xu
2020-07-28 1:58 ` Qu Wenruo
2020-07-28 2:23 ` Neal Gompa
2020-07-28 11:38 ` David Sterba
2020-07-28 12:03 ` Qu Wenruo
2020-07-28 12:12 ` Qu Wenruo
2020-07-28 12:57 ` David Sterba
2020-07-28 13:00 ` Qu Wenruo
2020-07-28 17:26 ` Daniel Xu [this message]
2020-07-29 9:59 ` David Sterba
2020-07-28 17:24 ` Daniel Xu
2020-07-29 9:58 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C4IFM8SN79ND.2BH0DOVF4VXEG@maharaja \
--to=dxu@dxuuu.xyz \
--cc=dsterba@suse.cz \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox