Message ID | 20241020133307.180885-1-robert.mader@collabora.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Robert, Thank you for the patch. On Sun, Oct 20, 2024 at 03:33:07PM +0200, Robert Mader wrote: > To make contributing to libcamera more fun, see > https://editorconfig.org/ > > Signed-off-by: Robert Mader <robert.mader@collabora.com> > > --- > > 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 | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 .editorconfig > > diff --git a/.editorconfig b/.editorconfig > new file mode 100644 > index 00000000..9d60c29f > --- /dev/null > +++ b/.editorconfig > @@ -0,0 +1,25 @@ > +# 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 > + > +[*.py] > +indent_size = 4 > +indent_style = space > + > +[*.xml] > +indent_size = 2 > +indent_style = space > + > +[{meson.build,meson.options,meson_options.txt}] We don't use meson.options, we have meson_options.txt only. I didn't know about meson.options, and it would be nice to switch to it, but it requires meson 1.1.0 while we support meson >= 0.63 at this point. I'd drop meson.options here for now. > +indent_size = 2 We use 4 spaces to indent meson files. > +indent_style = space
On 20.10.24 17:43, Laurent Pinchart wrote: > Hi Robert, > > Thank you for the patch. > > On Sun, Oct 20, 2024 at 03:33:07PM +0200, Robert Mader wrote: >> To make contributing to libcamera more fun, see >> https://editorconfig.org/ >> >> Signed-off-by: Robert Mader<robert.mader@collabora.com> >> >> --- >> >> 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 | 25 +++++++++++++++++++++++++ >> 1 file changed, 25 insertions(+) >> create mode 100644 .editorconfig >> >> diff --git a/.editorconfig b/.editorconfig >> new file mode 100644 >> index 00000000..9d60c29f >> --- /dev/null >> +++ b/.editorconfig >> @@ -0,0 +1,25 @@ >> +# 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 >> + >> +[*.py] >> +indent_size = 4 >> +indent_style = space >> + >> +[*.xml] >> +indent_size = 2 >> +indent_style = space >> + >> +[{meson.build,meson.options,meson_options.txt}] > We don't use meson.options, we have meson_options.txt only. I didn't > know about meson.options, and it would be nice to switch to it, but it > requires meson 1.1.0 while we support meson >= 0.63 at this point. I'd > drop meson.options here for now. Yeah, I thought I put it there as a subtle hint to switch at some point :) Dropped in v3. >> +indent_size = 2 > We use 4 spaces to indent meson files. Whoops, indeed, fixed in v3. Also added .json and .yaml where my editor regularly gets things wrong otherwise. > >> +indent_style = space
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..9d60c29f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +# 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 + +[*.py] +indent_size = 4 +indent_style = space + +[*.xml] +indent_size = 2 +indent_style = space + +[{meson.build,meson.options,meson_options.txt}] +indent_size = 2 +indent_style = space
To make contributing to libcamera more fun, see https://editorconfig.org/ Signed-off-by: Robert Mader <robert.mader@collabora.com> --- 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 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .editorconfig