[{"id":31832,"web_url":"https://patchwork.libcamera.org/comment/31832/","msgid":"<20241020154334.GB7770@pendragon.ideasonboard.com>","date":"2024-10-20T15:43:34","subject":"Re: [PATCH v2] Add .editorconfig file","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Robert,\n\nThank you for the patch.\n\nOn Sun, Oct 20, 2024 at 03:33:07PM +0200, Robert Mader wrote:\n> To make contributing to libcamera more fun, see\n> https://editorconfig.org/\n> \n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> \n> ---\n> \n> Changes in version 2:\n>  - require insert_final_newline for all files, including the file added here\n>  - add python config\n>  - add more meson file types\n> ---\n>  .editorconfig | 25 +++++++++++++++++++++++++\n>  1 file changed, 25 insertions(+)\n>  create mode 100644 .editorconfig\n> \n> diff --git a/.editorconfig b/.editorconfig\n> new file mode 100644\n> index 00000000..9d60c29f\n> --- /dev/null\n> +++ b/.editorconfig\n> @@ -0,0 +1,25 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +root = true\n> +\n> +[*]\n> +charset = utf-8\n> +end_of_line = lf\n> +insert_final_newline = true\n> +trim_trailing_whitespace = true\n> +\n> +[*.{cpp,h}]\n> +indent_size = 8\n> +indent_style = tab\n> +\n> +[*.py]\n> +indent_size = 4\n> +indent_style = space\n> +\n> +[*.xml]\n> +indent_size = 2\n> +indent_style = space\n> +\n> +[{meson.build,meson.options,meson_options.txt}]\n\nWe don't use meson.options, we have meson_options.txt only. I didn't\nknow about meson.options, and it would be nice to switch to it, but it\nrequires meson 1.1.0 while we support meson >= 0.63 at this point. I'd\ndrop meson.options here for now.\n\n> +indent_size = 2\n\nWe use 4 spaces to indent meson files.\n\n> +indent_style = space","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3A9ABC3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 20 Oct 2024 15:43:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D9AF66538F;\n\tSun, 20 Oct 2024 17:43:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D811665379\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Oct 2024 17:43:40 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 608CF352;\n\tSun, 20 Oct 2024 17:41:55 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mQeFs7X2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1729438915;\n\tbh=73DuByLbyO33dEVaQK7Ki5nsbej5RSOws0oDvho+Vkc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mQeFs7X2Kg3DZkQ9AAf84IA+gs8wpYJBGqt9qHjxqKBkIql9dafnxt9+w2HuT/KA5\n\tyAA3toI5CO7MljuZuJVz5IS4slS5AB69f2bnqh2+bbkn1T+Th2Oz/EgKIJE/zX1oJQ\n\txAHRx0aXq8I3IOC1NWhffwtQIManUaM4D/0b8wl8=","Date":"Sun, 20 Oct 2024 18:43:34 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2] Add .editorconfig file","Message-ID":"<20241020154334.GB7770@pendragon.ideasonboard.com>","References":"<20241020133307.180885-1-robert.mader@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20241020133307.180885-1-robert.mader@collabora.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":31836,"web_url":"https://patchwork.libcamera.org/comment/31836/","msgid":"<5a4bad98-974f-49a8-9944-1d8ced12642a@collabora.com>","date":"2024-10-20T16:53:14","subject":"Re: [PATCH v2] Add .editorconfig file","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"On 20.10.24 17:43, Laurent Pinchart wrote:\n> Hi Robert,\n>\n> Thank you for the patch.\n>\n> On Sun, Oct 20, 2024 at 03:33:07PM +0200, Robert Mader wrote:\n>> To make contributing to libcamera more fun, see\n>> https://editorconfig.org/\n>>\n>> Signed-off-by: Robert Mader<robert.mader@collabora.com>\n>>\n>> ---\n>>\n>> Changes in version 2:\n>>   - require insert_final_newline for all files, including the file added here\n>>   - add python config\n>>   - add more meson file types\n>> ---\n>>   .editorconfig | 25 +++++++++++++++++++++++++\n>>   1 file changed, 25 insertions(+)\n>>   create mode 100644 .editorconfig\n>>\n>> diff --git a/.editorconfig b/.editorconfig\n>> new file mode 100644\n>> index 00000000..9d60c29f\n>> --- /dev/null\n>> +++ b/.editorconfig\n>> @@ -0,0 +1,25 @@\n>> +# SPDX-License-Identifier: CC0-1.0\n>> +\n>> +root = true\n>> +\n>> +[*]\n>> +charset = utf-8\n>> +end_of_line = lf\n>> +insert_final_newline = true\n>> +trim_trailing_whitespace = true\n>> +\n>> +[*.{cpp,h}]\n>> +indent_size = 8\n>> +indent_style = tab\n>> +\n>> +[*.py]\n>> +indent_size = 4\n>> +indent_style = space\n>> +\n>> +[*.xml]\n>> +indent_size = 2\n>> +indent_style = space\n>> +\n>> +[{meson.build,meson.options,meson_options.txt}]\n> We don't use meson.options, we have meson_options.txt only. I didn't\n> know about meson.options, and it would be nice to switch to it, but it\n> requires meson 1.1.0 while we support meson >= 0.63 at this point. I'd\n> drop meson.options here for now.\nYeah, I thought I put it there as a subtle hint to switch at some point \n:) Dropped in v3.\n>> +indent_size = 2\n> We use 4 spaces to indent meson files.\nWhoops, indeed, fixed in v3. Also added .json and .yaml where my editor \nregularly gets things wrong otherwise.\n>\n>> +indent_style = space","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BEA8FC3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 20 Oct 2024 16:53:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DA13565394;\n\tSun, 20 Oct 2024 18:53:21 +0200 (CEST)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 295056538B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Oct 2024 18:53:19 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1729443196131287.9379808528581;\n\tSun, 20 Oct 2024 09:53:16 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"k3ISvi4i\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1729443197; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=Es0DIVZJ+Dd8F/t9Rv4jhxba91FloZG4HTp8VoeXOgCv93zHDf9XRYE3tt8skuA8ns/uQz8a3QvVQ0mWwfPBY/ew+wCuZ6YTCoAe0bGyQNvUtpgM4Aj2/0+3/+GliankphjBi6cOXz0bupzxM0xLUfggW0khVXdoBN2b+nVbEBk=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1729443197;\n\th=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=7A8NmBrSh36eAqRcbtf/nBlq8FQpHxWbBctgOVbBT8I=; \n\tb=FI5b9K/xLtvnNar5EDwV1OtqdCKHXfhEu9fFbBw5w3izNg3W3xCay0OH/pW6lsU+QqKUKh/Xmar6UtnoQC6UJ4LU6ifaSLGnPnLf0w70PXxunGa1XRRb39T8dVQbBr6ERiupNRaknquK3V/dPMbSr9joIDUNxRBdXkgSuVdei3o=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1729443197;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Content-Type:Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Message-Id:Reply-To;\n\tbh=7A8NmBrSh36eAqRcbtf/nBlq8FQpHxWbBctgOVbBT8I=;\n\tb=k3ISvi4iFyNYZ5vigxJbeNBglFXMZDyeB/FMNLhtmTPY/oKJN9W5tWVM4d3Pfddw\n\tLmdnuDNminqrUDTG6BQceKehdkxShZHiJL1CqPp2skBk3OB8/k+IDHJyk+nCgue28bq\n\tERfxOKx71m9w6gVV3hFwAstkhz87ED0rG9bzWjhI=","Content-Type":"multipart/alternative;\n\tboundary=\"------------BQaCe5weUceWx0Us0ICI00Yn\"","Message-ID":"<5a4bad98-974f-49a8-9944-1d8ced12642a@collabora.com>","Date":"Sun, 20 Oct 2024 18:53:14 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] Add .editorconfig file","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20241020133307.180885-1-robert.mader@collabora.com>\n\t<20241020154334.GB7770@pendragon.ideasonboard.com>","Content-Language":"en-US","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20241020154334.GB7770@pendragon.ideasonboard.com>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]