All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] introduce .editorconfig
@ 2023-03-01 10:43 Dzmitry Sankouski
  2023-03-01 10:43 ` [PATCH v2 1/1] editorconfig: " Dzmitry Sankouski
  0 siblings, 1 reply; 6+ messages in thread
From: Dzmitry Sankouski @ 2023-03-01 10:43 UTC (permalink / raw)
  To: u-boot; +Cc: Dzmitry Sankouski, Simon Glass

Current process of sending patches includes running checkpatch.pl
script for each patch, and fixing found style problems.
Editorconfig may help to prevent some style related problems
(like spaces vs tab indentation) on the fly.

Dzmitry Sankouski (1):
  editorconfig: introduce .editorconfig

 .editorconfig               | 15 +++++++++++++++
 .gitignore                  |  1 +
 doc/develop/codingstyle.rst |  4 ++++
 3 files changed, 20 insertions(+)
 create mode 100644 .editorconfig

-- 
2.30.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/1] editorconfig: introduce .editorconfig
  2023-03-01 10:43 [PATCH v2 0/1] introduce .editorconfig Dzmitry Sankouski
@ 2023-03-01 10:43 ` Dzmitry Sankouski
  2023-03-01 15:58   ` Tom Rini
  2023-03-02 18:57   ` Fabio Estevam
  0 siblings, 2 replies; 6+ messages in thread
From: Dzmitry Sankouski @ 2023-03-01 10:43 UTC (permalink / raw)
  To: u-boot; +Cc: Dzmitry Sankouski, Simon Glass

Current process of sending patches includes running checkpatch.pl
script for each patch, and fixing found style problems.
EditorConfig may help to prevent some style related problems
(like spaces vs tab indentation) on the fly.

Reviewed-by: Simon Glass <sjg@chromium.org>
---
Changes for v2:
- add section in coding style rst doc
- unify Kconfig with other files

 .editorconfig               | 15 +++++++++++++++
 .gitignore                  |  1 +
 doc/develop/codingstyle.rst |  4 ++++
 3 files changed, 20 insertions(+)
 create mode 100644 .editorconfig

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..10fe165f09
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+; This file is for unifying the coding style for different editors and IDEs.
+; Plugins are available for notepad++, emacs, vim, gedit,
+; textmate, visual studio, and more.
+;
+; See http://editorconfig.org for details.
+
+# Top-most EditorConfig file.
+root = true
+
+[{**.c, **.h, **Kconfig}]
+indent_style = tab
+indent_size=8
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git a/.gitignore b/.gitignore
index 3a4d056edf..ed8ca226fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
 #
 .*
 !.checkpatch.conf
+!.editorconfig
 *.a
 *.asn1.[ch]
 *.bin
diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst
index 1d5d0192b3..741bc58b83 100644
--- a/doc/develop/codingstyle.rst
+++ b/doc/develop/codingstyle.rst
@@ -27,6 +27,10 @@ The following rules apply:
   more information, read :doc:`checkpatch`. Note that this should be done
   *before* posting on the mailing list!
 
+* Some code style rules may be applied automatically by your editor using
+  EditorConfig tool. Feel free to setup your editor to work with u-boot's
+  .editorconfig.
+
 * Source files originating from different projects (for example the MTD
   subsystem or the hush shell code from the BusyBox project) may, after
   careful consideration, be exempted from these rules. For such files, the
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
  2023-03-01 10:43 ` [PATCH v2 1/1] editorconfig: " Dzmitry Sankouski
@ 2023-03-01 15:58   ` Tom Rini
  2023-03-02 15:00     ` Dzmitry Sankouski
  2023-03-02 18:57   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Tom Rini @ 2023-03-01 15:58 UTC (permalink / raw)
  To: Dzmitry Sankouski; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

On Wed, Mar 01, 2023 at 01:43:38PM +0300, Dzmitry Sankouski wrote:
> Current process of sending patches includes running checkpatch.pl
> script for each patch, and fixing found style problems.
> EditorConfig may help to prevent some style related problems
> (like spaces vs tab indentation) on the fly.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> Changes for v2:
> - add section in coding style rst doc
> - unify Kconfig with other files
> 
>  .editorconfig               | 15 +++++++++++++++
>  .gitignore                  |  1 +
>  doc/develop/codingstyle.rst |  4 ++++
>  3 files changed, 20 insertions(+)
>  create mode 100644 .editorconfig
> 
> diff --git a/.editorconfig b/.editorconfig
> new file mode 100644
> index 0000000000..10fe165f09
> --- /dev/null
> +++ b/.editorconfig
> @@ -0,0 +1,15 @@
> +; This file is for unifying the coding style for different editors and IDEs.
> +; Plugins are available for notepad++, emacs, vim, gedit,
> +; textmate, visual studio, and more.
> +;
> +; See http://editorconfig.org for details.
> +
> +# Top-most EditorConfig file.
> +root = true
> +
> +[{**.c, **.h, **Kconfig}]
> +indent_style = tab
> +indent_size=8

As Simon noted before, this should be " = 8".

> +end_of_line = lf
> +trim_trailing_whitespace = true
> +insert_final_newline = true
> diff --git a/.gitignore b/.gitignore
> index 3a4d056edf..ed8ca226fe 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -7,6 +7,7 @@
>  #
>  .*
>  !.checkpatch.conf
> +!.editorconfig
>  *.a
>  *.asn1.[ch]
>  *.bin
> diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst
> index 1d5d0192b3..741bc58b83 100644
> --- a/doc/develop/codingstyle.rst
> +++ b/doc/develop/codingstyle.rst
> @@ -27,6 +27,10 @@ The following rules apply:
>    more information, read :doc:`checkpatch`. Note that this should be done
>    *before* posting on the mailing list!
>  
> +* Some code style rules may be applied automatically by your editor using

"using the"

> +  EditorConfig tool. Feel free to setup your editor to work with u-boot's

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
  2023-03-01 15:58   ` Tom Rini
@ 2023-03-02 15:00     ` Dzmitry Sankouski
  2023-03-02 15:02       ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Dzmitry Sankouski @ 2023-03-02 15:00 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot, Simon Glass

ср, 1 мар. 2023 г. в 18:58, Tom Rini <trini@konsulko.com>:
>
> On Wed, Mar 01, 2023 at 01:43:38PM +0300, Dzmitry Sankouski wrote:
> > Current process of sending patches includes running checkpatch.pl
> > script for each patch, and fixing found style problems.
> > EditorConfig may help to prevent some style related problems
> > (like spaces vs tab indentation) on the fly.
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> > Changes for v2:
> > - add section in coding style rst doc
> > - unify Kconfig with other files
> >
> >  .editorconfig               | 15 +++++++++++++++
> >  .gitignore                  |  1 +
> >  doc/develop/codingstyle.rst |  4 ++++
> >  3 files changed, 20 insertions(+)
> >  create mode 100644 .editorconfig
> >
> > diff --git a/.editorconfig b/.editorconfig
> > new file mode 100644
> > index 0000000000..10fe165f09
> > --- /dev/null
> > +++ b/.editorconfig
> > @@ -0,0 +1,15 @@
> > +; This file is for unifying the coding style for different editors and IDEs.
> > +; Plugins are available for notepad++, emacs, vim, gedit,
> > +; textmate, visual studio, and more.
> > +;
> > +; See http://editorconfig.org for details.
> > +
> > +# Top-most EditorConfig file.
> > +root = true
> > +
> > +[{**.c, **.h, **Kconfig}]
> > +indent_style = tab
> > +indent_size=8
>
> As Simon noted before, this should be " = 8".
>
oops, I thought he meant consistent spacing in a sense of 8 spaces.
I personally like Kconfigs with 4 indent more.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
  2023-03-02 15:00     ` Dzmitry Sankouski
@ 2023-03-02 15:02       ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2023-03-02 15:02 UTC (permalink / raw)
  To: Dzmitry Sankouski; +Cc: u-boot, Simon Glass

[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]

On Thu, Mar 02, 2023 at 06:00:43PM +0300, Dzmitry Sankouski wrote:
> ср, 1 мар. 2023 г. в 18:58, Tom Rini <trini@konsulko.com>:
> >
> > On Wed, Mar 01, 2023 at 01:43:38PM +0300, Dzmitry Sankouski wrote:
> > > Current process of sending patches includes running checkpatch.pl
> > > script for each patch, and fixing found style problems.
> > > EditorConfig may help to prevent some style related problems
> > > (like spaces vs tab indentation) on the fly.
> > >
> > > Reviewed-by: Simon Glass <sjg@chromium.org>
> > > ---
> > > Changes for v2:
> > > - add section in coding style rst doc
> > > - unify Kconfig with other files
> > >
> > >  .editorconfig               | 15 +++++++++++++++
> > >  .gitignore                  |  1 +
> > >  doc/develop/codingstyle.rst |  4 ++++
> > >  3 files changed, 20 insertions(+)
> > >  create mode 100644 .editorconfig
> > >
> > > diff --git a/.editorconfig b/.editorconfig
> > > new file mode 100644
> > > index 0000000000..10fe165f09
> > > --- /dev/null
> > > +++ b/.editorconfig
> > > @@ -0,0 +1,15 @@
> > > +; This file is for unifying the coding style for different editors and IDEs.
> > > +; Plugins are available for notepad++, emacs, vim, gedit,
> > > +; textmate, visual studio, and more.
> > > +;
> > > +; See http://editorconfig.org for details.
> > > +
> > > +# Top-most EditorConfig file.
> > > +root = true
> > > +
> > > +[{**.c, **.h, **Kconfig}]
> > > +indent_style = tab
> > > +indent_size=8
> >
> > As Simon noted before, this should be " = 8".
> >
> oops, I thought he meant consistent spacing in a sense of 8 spaces.
> I personally like Kconfigs with 4 indent more.

Ah.  But, in both cases it should be 8, as well.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
  2023-03-01 10:43 ` [PATCH v2 1/1] editorconfig: " Dzmitry Sankouski
  2023-03-01 15:58   ` Tom Rini
@ 2023-03-02 18:57   ` Fabio Estevam
  1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2023-03-02 18:57 UTC (permalink / raw)
  To: Dzmitry Sankouski; +Cc: u-boot, Simon Glass

Hi Dzmitry,

On Wed, Mar 1, 2023 at 7:44 AM Dzmitry Sankouski <dsankouski@gmail.com> wrote:
>
> Current process of sending patches includes running checkpatch.pl
> script for each patch, and fixing found style problems.
> EditorConfig may help to prevent some style related problems
> (like spaces vs tab indentation) on the fly.
>
> Reviewed-by: Simon Glass <sjg@chromium.org>

You missed giving your Signed-off-by tag.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-03-02 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 10:43 [PATCH v2 0/1] introduce .editorconfig Dzmitry Sankouski
2023-03-01 10:43 ` [PATCH v2 1/1] editorconfig: " Dzmitry Sankouski
2023-03-01 15:58   ` Tom Rini
2023-03-02 15:00     ` Dzmitry Sankouski
2023-03-02 15:02       ` Tom Rini
2023-03-02 18:57   ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.