Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F37CC7EE2D for ; Fri, 3 Mar 2023 15:34:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 74F9285D6C; Fri, 3 Mar 2023 16:34:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qyllyb8H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D0A9D85D66; Fri, 3 Mar 2023 16:34:04 +0100 (CET) Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 212FA85D6B for ; Fri, 3 Mar 2023 16:34:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dsankouski@gmail.com Received: by mail-lj1-x229.google.com with SMTP id h9so2753234ljq.2 for ; Fri, 03 Mar 2023 07:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Uzoi4gvILUQRwS4ITNNZgdd7XIwKmkZJN75BN11aPJI=; b=qyllyb8H9LY5DvScGP4DakPMHreSiy3PohwceWdwl2QUrNDyDX8G1P4ELvmD4WWb6g 4CeIRRfxd45M8KFzNjIRgB7u1qaMNd3pcE9L4yGgu/Ij0PHRR4p8Aa1PZyOWlwL9fXS7 OcgxMlP3FVkbPzcGu+9QJAQjw8b19tDec83SmxNR8qG9exsHoaEqoULSdh7/UmG8HqfA T/1QAw2Xmpfk+sEPxbyrTxpqD0vUtWtaqDAjAnC51OXd7FV8mVOCDCTU3FioumxO1D61 vGpITZaWB00/Tmq4k9fG86qawRkZ76o7bjjzMgK0orkxDqTWuagwNlVD6Lr1m77XISF8 GRpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uzoi4gvILUQRwS4ITNNZgdd7XIwKmkZJN75BN11aPJI=; b=O4TDk1WCPrmFxS5HawxZv636vqyJ/AkdWAA5/WYOcgGeyFnPt0BAJU45gJTIqjsI15 /jFRtqqV8ZdQsn945j+seH3LIYWTLSoXATd5gCvON2eKQ23l8jFCnDBfEHEpVZ19rxKT QRgBP42qNkgnt7k32hh0XZ+sWbj0BlbXFIegsBTGL2Zizj7w0+Z+dqBzJlUbAzAmhu8X O31SoydXVLr/m6oAeq3mujjSl7tDrWtx+6Nu4X5MXFCxZn3CZ08jRTrKu2p510E7UU1w OSMzhYsTC4p2v3Zi1m3fj1E1VtEkZlQAiX7o+TW7BW+NF+T8ovht7pV7H77WGCZP6AO+ 0aEg== X-Gm-Message-State: AO0yUKWKJH+a5gaH0HpBhZIyTSiq+0abejAEYZadZjLatR3aH+0LFbyn 3S2E3OOocWkbfo+/Rea6qy2EvtVOyHM= X-Google-Smtp-Source: AK7set/I47G1jIYCK88qwnp9MxdTkvKrCnyD2oFJCoMFNEC+HurfMyiurCYHiSRAOcWDCwRQxvg/rQ== X-Received: by 2002:a2e:9141:0:b0:295:b2e0:4f30 with SMTP id q1-20020a2e9141000000b00295b2e04f30mr731628ljg.46.1677857639372; Fri, 03 Mar 2023 07:33:59 -0800 (PST) Received: from debian.localdomain ([178.127.132.237]) by smtp.googlemail.com with ESMTPSA id w19-20020a2e9593000000b002935632b3f8sm360466ljh.14.2023.03.03.07.33.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 07:33:59 -0800 (PST) From: Dzmitry Sankouski To: U-Boot Mailing List Cc: Dzmitry Sankouski , Simon Glass , Andrey Zhizhikin , Heinrich Schuchardt , Maxim Cournoyer Subject: [PATCH v3 1/1] editorconfig: introduce .editorconfig Date: Fri, 3 Mar 2023 18:33:48 +0300 Message-Id: <20230303153349.1859499-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230303153349.1859499-1-dsankouski@gmail.com> References: <20230303153349.1859499-1-dsankouski@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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 Signed-off-by: Dzmitry Sankouski --- Changes in v3: - add 'the' article in docs - fix spacing - add sign off tag Changes in 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..df69cee160 --- /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 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitignore b/.gitignore index 3a4d056edf..ed8ca226fe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ # .* !.checkpatch.conf +!.editorconfig *.a *.asn1.[ch] *.bin diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst index 1d5d0192b3..0bbac75d4e 100644 --- a/doc/develop/codingstyle.rst +++ b/doc/develop/codingstyle.rst @@ -27,6 +27,10 @@ The following rules apply: more information, read :doc:`checkpatch`. Note that this should be done *before* posting on the mailing list! +* Some code style rules may be applied automatically by your editor using + the EditorConfig tool. Feel free to setup your editor to work with u-boot's + .editorconfig. + * Source files originating from different projects (for example the MTD subsystem or the hush shell code from the BusyBox project) may, after careful consideration, be exempted from these rules. For such files, the -- 2.30.2