[{"id":31828,"web_url":"https://patchwork.libcamera.org/comment/31828/","msgid":"<172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk>","date":"2024-10-20T11:09:48","subject":"Re: [PATCH] Add .editorconfig file","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Robert Mader (2024-10-19 14:16:06)\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>  .editorconfig | 21 +++++++++++++++++++++\n>  1 file changed, 21 insertions(+)\n>  create mode 100644 .editorconfig\n> \n> diff --git a/.editorconfig b/.editorconfig\n> new file mode 100644\n> index 00000000..4599ce24\n> --- /dev/null\n> +++ b/.editorconfig\n> @@ -0,0 +1,21 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +root = true\n> +\n> +[*]\n> +charset = utf-8\n> +end_of_line = lf\n> +trim_trailing_whitespace = true\n> +\n> +[*.{cpp,h}]\n> +indent_size = 8\n> +indent_style = tab\n> +insert_final_newline = true\n> +\n> +[*.xml]\n> +indent_size = 2\n> +indent_style = space\n> +\n> +[meson.build]\n> +indent_size = 2\n> +indent_style = space\n> \\ No newline at end of file\n\n\nWe have 'insert_final_newline' on cpp and .h files which I think is\ngood, but here in this file - theres' no final newline right? Maybe we\nshould add that globally? \n\nWe have python code too. Should we add in the reference from\neditorconfig for\n\n\n[*.py]\nindent_style = space\nindent_size = 4\n\n? or is that default ?\n\n\nIt's cheap to add this:\n\n\n\nAcked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\n> -- \n> 2.47.0\n>","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 CDD5BC3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 20 Oct 2024 11:09:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 973536538D;\n\tSun, 20 Oct 2024 13:09:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7EA7265379\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Oct 2024 13:09:51 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C479502;\n\tSun, 20 Oct 2024 13:08:06 +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=\"Ft/ZJJph\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1729422486;\n\tbh=AiijoKDFBm2L47ywWNfIjNQ2DOcqcuYm8DAUiR4zl5E=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Ft/ZJJphtIzK5bNN9UC0mRrlH3KFbwOysM5oIH7zzsDDAE2tvk+7Gibw/m7ZSSYfj\n\tapsZQ+UBok/0wl3he+XQFQ7PCuugXYwSxtIOzCMI16VRjgRv8Z5xYS0W0GFT0wKLW4\n\tfQp65DmhN5LEndyYJFgy4GZvHDiSY7IRwO7wO5Z0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20241019131606.56551-1-robert.mader@collabora.com>","References":"<20241019131606.56551-1-robert.mader@collabora.com>","Subject":"Re: [PATCH] Add .editorconfig file","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Robert Mader <robert.mader@collabora.com>","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Sun, 20 Oct 2024 12:09:48 +0100","Message-ID":"<172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":31829,"web_url":"https://patchwork.libcamera.org/comment/31829/","msgid":"<2da38867-105c-4bf5-a4d1-2835b2e0e8a2@collabora.com>","date":"2024-10-20T13:38:21","subject":"Re: [PATCH] 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 13:09, Kieran Bingham wrote:\n> Quoting Robert Mader (2024-10-19 14:16:06)\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>>   .editorconfig | 21 +++++++++++++++++++++\n>>   1 file changed, 21 insertions(+)\n>>   create mode 100644 .editorconfig\n>>\n>> diff --git a/.editorconfig b/.editorconfig\n>> new file mode 100644\n>> index 00000000..4599ce24\n>> --- /dev/null\n>> +++ b/.editorconfig\n>> @@ -0,0 +1,21 @@\n>> +# SPDX-License-Identifier: CC0-1.0\n>> +\n>> +root = true\n>> +\n>> +[*]\n>> +charset = utf-8\n>> +end_of_line = lf\n>> +trim_trailing_whitespace = true\n>> +\n>> +[*.{cpp,h}]\n>> +indent_size = 8\n>> +indent_style = tab\n>> +insert_final_newline = true\n>> +\n>> +[*.xml]\n>> +indent_size = 2\n>> +indent_style = space\n>> +\n>> +[meson.build]\n>> +indent_size = 2\n>> +indent_style = space\n>> \\ No newline at end of file\n>\n> We have 'insert_final_newline' on cpp and .h files which I think is\n> good, but here in this file - theres' no final newline right? Maybe we\n> should add that globally?\n\nHeh, good point, done in v2 (which triggered my editor to add the new-line).\n\n>\n> We have python code too. Should we add in the reference from\n> editorconfig for\n>\n>\n> [*.py]\n> indent_style = space\n> indent_size = 4\n>\n> ? or is that default ?\nI think it's the default, but doesn't hurt to add - the example config \non https://editorconfig.org/ mentions it, too.\n>\n> It's cheap to add this:\n>\n>\n>\n> Acked-by: Kieran Bingham<kieran.bingham@ideasonboard.com>\nOh, forgot to collect this one. Just for the record: the config here is \nquite similar to what's used in Mutter, Gnome-Shell and a bunch of other \nprojects.\n>\n>> -- \n>> 2.47.0\n>>","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 34C9EC3304\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 20 Oct 2024 13:38:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 64A4365390;\n\tSun, 20 Oct 2024 15:38:31 +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 D589A65379\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 20 Oct 2024 15:38:28 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1729431503786115.6276618497617;\n\tSun, 20 Oct 2024 06:38:23 -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=\"VsSy0BfM\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1729431504; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=dtYTh94rG71BSMeNwACSh3BdjiecjYzbxDHTfe0Uc/lDYQfSkpMikBAKMfGSDYDnpCBLtu1bC2L44IFRZza3m2EQD/scKBp74u4F4Utc+Lmw8BkL2wvMiQMhLny7rVVnAqXZOTXXj2TVDEjq5mdYEjcAtvLCduHs+ja1oa8Tyx0=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1729431504;\n\th=Content-Type:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc;\n\tbh=lBs2Ykx16TcSdcEXaG/gNPF7T0j2JGb3bNr7oGFvJSQ=; \n\tb=VfV63PJDJ8GDLuDmg5gAFk7Eyt0by/2uGHK4+1g7aE/bwwOPWwxSZUe54ZD3ftH0HSuaijU+MiiSs6cRwJkHPRdl3qbcTxqxPXPtMxSM1Uav0EwO8Q57jbQHU6GbKhe9JdSEgQOBDcUT2G4XLl/HQ5tYvOScmDquvYekVVA9knA=","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=1729431504;\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:References:From:From:In-Reply-To:Message-Id:Reply-To:Cc;\n\tbh=lBs2Ykx16TcSdcEXaG/gNPF7T0j2JGb3bNr7oGFvJSQ=;\n\tb=VsSy0BfM1QBQiBhqQpl1b1SKOQDV+80wShzMq/zpErH7VB3eITTHyTcsF5xVcDOR\n\t2rfX+fFwO4EFlQ3C8DaAuCQSaxaRH4fgBhTw022XgbtvCaDbUfVBfCrrAGw8yEHF9Or\n\td7r3XobdoqgVe0SwsOxhmjuk6f+LibjhVyZWLFy8=","Content-Type":"multipart/alternative;\n\tboundary=\"------------J0Pv7EPGwnv5QL03b94vO9Jq\"","Message-ID":"<2da38867-105c-4bf5-a4d1-2835b2e0e8a2@collabora.com>","Date":"Sun, 20 Oct 2024 15:38:21 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] Add .editorconfig file","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20241019131606.56551-1-robert.mader@collabora.com>\n\t<172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk>","Content-Language":"en-US","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<172942258848.31090.15823321404100734143@ping.linuxembedded.co.uk>","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>"}}]