[PATCH v3] Add .editorconfig file
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Nov 20 00:49:05 CET 2024
On Tue, Nov 19, 2024 at 11:28:47PM +0000, Kieran Bingham wrote:
> Quoting Robert Mader (2024-10-20 17:49:26)
> > To make contributing to libcamera more fun, see
> > https://editorconfig.org/
> >
> > Signed-off-by: Robert Mader <robert.mader at collabora.com>
> > Acked-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> Any objections to me merging this one ? or Additional review comments,
> or tags ?
I'm not a huge fan of having tool-specific configuration files in the
source tree (except for tools libcamera uses explicitly of course, such
as clang-format), but as editorconfig is trying to set some sort of
standard, even if it's not that widespread (yet?), I have no objection.
> > ---
> >
> > Changes in version 3:
> > - changed indent_size for meson files to 4
> > - dropped meson.options from v2 again
> > - added sections for .json and .yaml
> > - dropped section for .xml
> > - collected Acked-by
> >
> > Changes in version 2:
> > - require insert_final_newline for all files, including the file added here
> > - add python config
> > - add more meson file types
> > ---
> > .editorconfig | 29 +++++++++++++++++++++++++++++
> > 1 file changed, 29 insertions(+)
> > create mode 100644 .editorconfig
> >
> > diff --git a/.editorconfig b/.editorconfig
> > new file mode 100644
> > index 00000000..a76b36a7
> > --- /dev/null
> > +++ b/.editorconfig
> > @@ -0,0 +1,29 @@
> > +# SPDX-License-Identifier: CC0-1.0
> > +
> > +root = true
> > +
> > +[*]
> > +charset = utf-8
> > +end_of_line = lf
> > +insert_final_newline = true
> > +trim_trailing_whitespace = true
> > +
> > +[*.{cpp,h}]
> > +indent_size = 8
> > +indent_style = tab
> > +
> > +[*.json]
> > +indent_size = 4
> > +indent_style = space
> > +
> > +[*.py]
> > +indent_size = 4
> > +indent_style = space
> > +
> > +[*.yaml]
> > +indent_size = 2
> > +indent_style = space
> > +
> > +[{meson.build,meson_options.txt}]
> > +indent_size = 4
> > +indent_style = space
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list