* [PATCH] btrfs-progs: Add basic .editorconfig
@ 2020-07-28 1:24 Daniel Xu
2020-07-28 1:50 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Xu @ 2020-07-28 1:24 UTC (permalink / raw)
To: linux-btrfs; +Cc: Daniel Xu, kernel-team
Not all contributors work on projects that use linux kernel coding
style. This commit adds a basic editorconfig [0] to assist contributors
with managing configuration.
[0]: https://editorconfig.org/
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
---
.editorconfig | 10 ++++++++++
.gitignore | 1 +
2 files changed, 11 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..2829cfbe
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,10 @@
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+charset = utf-8
+indent_style = space
+indent_size = 8
+
+[*.py]
+indent_size = 4
diff --git a/.gitignore b/.gitignore
index aadf9ae7..1c70ec94 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,7 @@
/cscope.in.out
/cscope.po.out
.*
+!.editorconfig
/Documentation/Makefile
/Documentation/*.html
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs-progs: Add basic .editorconfig
2020-07-28 1:24 [PATCH] btrfs-progs: Add basic .editorconfig Daniel Xu
@ 2020-07-28 1:50 ` Qu Wenruo
2020-07-28 1:57 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2020-07-28 1:50 UTC (permalink / raw)
To: Daniel Xu, linux-btrfs; +Cc: kernel-team
[-- Attachment #1.1: Type: text/plain, Size: 1565 bytes --]
On 2020/7/28 上午9:24, Daniel Xu wrote:
> Not all contributors work on projects that use linux kernel coding
> style. This commit adds a basic editorconfig [0] to assist contributors
> with managing configuration.
>
> [0]: https://editorconfig.org/
I like the idea of the generic style file.
It's just one single file for all editors.
Although most btrfs developers I know use vim, and it's not supported
natively, it shouldn't be a big problem, a plugin would handle it
without problem.
>
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Reviewed-by: Qu Wenruo <wqu@suse.com>
But a small nitpick inlined below.
> ---
> .editorconfig | 10 ++++++++++
> .gitignore | 1 +
> 2 files changed, 11 insertions(+)
> create mode 100644 .editorconfig
>
> diff --git a/.editorconfig b/.editorconfig
> new file mode 100644
> index 00000000..2829cfbe
> --- /dev/null
> +++ b/.editorconfig
> @@ -0,0 +1,10 @@
> +[*]
> +end_of_line = lf
> +insert_final_newline = true
> +trim_trailing_whitespace = true
> +charset = utf-8
> +indent_style = space
> +indent_size = 8
> +
> +[*.py]
> +indent_size = 4
> diff --git a/.gitignore b/.gitignore
> index aadf9ae7..1c70ec94 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -65,6 +65,7 @@
> /cscope.in.out
> /cscope.po.out
> .*
> +!.editorconfig
You can force add that file and git should handle it without problem,
and later modification would also be traced by git.
Thanks,
Qu
>
> /Documentation/Makefile
> /Documentation/*.html
> --
> 2.27.0
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs-progs: Add basic .editorconfig
2020-07-28 1:50 ` Qu Wenruo
@ 2020-07-28 1:57 ` Qu Wenruo
2020-07-28 1:57 ` Daniel Xu
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2020-07-28 1:57 UTC (permalink / raw)
To: Daniel Xu, linux-btrfs; +Cc: kernel-team
[-- Attachment #1.1: Type: text/plain, Size: 1826 bytes --]
On 2020/7/28 上午9:50, Qu Wenruo wrote:
>
>
> On 2020/7/28 上午9:24, Daniel Xu wrote:
>> Not all contributors work on projects that use linux kernel coding
>> style. This commit adds a basic editorconfig [0] to assist contributors
>> with managing configuration.
>>
>> [0]: https://editorconfig.org/
>
> I like the idea of the generic style file.
> It's just one single file for all editors.
>
> Although most btrfs developers I know use vim, and it's not supported
> natively, it shouldn't be a big problem, a plugin would handle it
> without problem.
>
>>
>> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
>
> Reviewed-by: Qu Wenruo <wqu@suse.com>
>
> But a small nitpick inlined below.
>
>> ---
>> .editorconfig | 10 ++++++++++
>> .gitignore | 1 +
>> 2 files changed, 11 insertions(+)
>> create mode 100644 .editorconfig
>>
>> diff --git a/.editorconfig b/.editorconfig
>> new file mode 100644
>> index 00000000..2829cfbe
>> --- /dev/null
>> +++ b/.editorconfig
>> @@ -0,0 +1,10 @@
>> +[*]
>> +end_of_line = lf
>> +insert_final_newline = true
>> +trim_trailing_whitespace = true
>> +charset = utf-8
>> +indent_style = space
Wait for a minute, does that mean, we use space as indent?
IIRC kernel code style goes tab if possible?
Thanks,
Qu
>> +indent_size = 8
>> +
>> +[*.py]
>> +indent_size = 4
>> diff --git a/.gitignore b/.gitignore
>> index aadf9ae7..1c70ec94 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -65,6 +65,7 @@
>> /cscope.in.out
>> /cscope.po.out
>> .*
>> +!.editorconfig
>
> You can force add that file and git should handle it without problem,
> and later modification would also be traced by git.
>
> Thanks,
> Qu
>
>>
>> /Documentation/Makefile
>> /Documentation/*.html
>> --
>> 2.27.0
>>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs-progs: Add basic .editorconfig
2020-07-28 1:57 ` Qu Wenruo
@ 2020-07-28 1:57 ` Daniel Xu
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Xu @ 2020-07-28 1:57 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs; +Cc: kernel-team
On Mon Jul 27, 2020 at 6:57 PM PDT, Qu Wenruo wrote:
>
>
> On 2020/7/28 上午9:50, Qu Wenruo wrote:
> >
> >
> > On 2020/7/28 上午9:24, Daniel Xu wrote:
> >> Not all contributors work on projects that use linux kernel coding
> >> style. This commit adds a basic editorconfig [0] to assist contributors
> >> with managing configuration.
> >>
> >> [0]: https://editorconfig.org/
> >
> > I like the idea of the generic style file.
> > It's just one single file for all editors.
> >
> > Although most btrfs developers I know use vim, and it's not supported
> > natively, it shouldn't be a big problem, a plugin would handle it
> > without problem.
> >
> >>
> >> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> >
> > Reviewed-by: Qu Wenruo <wqu@suse.com>
> >
> > But a small nitpick inlined below.
> >
> >> ---
> >> .editorconfig | 10 ++++++++++
> >> .gitignore | 1 +
> >> 2 files changed, 11 insertions(+)
> >> create mode 100644 .editorconfig
> >>
> >> diff --git a/.editorconfig b/.editorconfig
> >> new file mode 100644
> >> index 00000000..2829cfbe
> >> --- /dev/null
> >> +++ b/.editorconfig
> >> @@ -0,0 +1,10 @@
> >> +[*]
> >> +end_of_line = lf
> >> +insert_final_newline = true
> >> +trim_trailing_whitespace = true
> >> +charset = utf-8
> >> +indent_style = space
>
> Wait for a minute, does that mean, we use space as indent?
> IIRC kernel code style goes tab if possible?
>
> Thanks,
> Qu
Sorry, that was mistake. Just sent out a V2 before I saw your email.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-28 1:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 1:24 [PATCH] btrfs-progs: Add basic .editorconfig Daniel Xu
2020-07-28 1:50 ` Qu Wenruo
2020-07-28 1:57 ` Qu Wenruo
2020-07-28 1:57 ` Daniel Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).