[PATCH v2 1/1] editorconfig: introduce .editorconfig

Tom Rini trini at konsulko.com
Thu Mar 2 16:02:06 CET 2023


On Thu, Mar 02, 2023 at 06:00:43PM +0300, Dzmitry Sankouski wrote:
> ср, 1 мар. 2023 г. в 18:58, Tom Rini <trini at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230302/fd2989eb/attachment.sig>


More information about the U-Boot mailing list