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 9B392C64EC7 for ; Wed, 1 Mar 2023 10:44:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3941D85BB0; Wed, 1 Mar 2023 11:43:54 +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="hDROr/oA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3471F85739; Wed, 1 Mar 2023 11:43:50 +0100 (CET) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 55E3B85C18 for ; Wed, 1 Mar 2023 11:43:44 +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-lf1-x132.google.com with SMTP id f18so17049731lfa.3 for ; Wed, 01 Mar 2023 02:43:44 -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=QHjWVVldOSYTavURNRTQxr8iyLCLPh6jd0zdTzNQ9eM=; b=hDROr/oAsSygI6guceXQF7ZcYc9Pkca/5YwOLa0vmvLBi8tr6KV/2PZgcYK1+74GAS 54cU/SkHpD2hLLzoC4Wog03Lfk/W5GH98b7NXn+hTxnmUZ/87B0sT0ZnASuYUlD7w69e DbPgQFQFzQF2XU/x2OztTIrehALE+Iygn0gm/5s5uG0F7ce22qG1K+6vTGTBznaHmPwt 3/D9M/jP55MNy1koH8gI4AqNpuiWF0wLahpdXbRsYGpp03WFvAqGX12zm52ypuOXH39/ 9hhNf5cs7j/VBySm0aBz4vnYdUL7liMXF7Yb4fY3XvtLIbO37dViHXExZFaPb8bMVrUp rWqw== 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=QHjWVVldOSYTavURNRTQxr8iyLCLPh6jd0zdTzNQ9eM=; b=B9R/nUB6fTz6k2+C//77Eq1Yg5Mk94JC5IMBdqZ3y58EvrzzAgY/YuDwao/V/S7EIw 3eYm+ir/F5P6NFlULvmopDgxNXSNwOOnMZIXSg2N/TfE4v6QD8+DPhl+9d8E9Fc5rGU7 r/6jQUhj1PFjNb9sWU7tCcravB35GjkCR+JL+9BHNJx2jffzCCNBhoSeoAufgNREu0UF 58eucpOwdOxNlb+JkD0PHfGM6Ll6s0ZnhlqjHlLO5z/z4lddRxE1PM0s5b4V/+qC3jXb cKq0JLmHdweqUe6uWnq3pO4gi2q38q50E9SmgPK3Rh/kraPkomALpllSthuuoR8pCmxi iakg== X-Gm-Message-State: AO0yUKVxZ6DOVuUcmYv7xThh/q4b9Y1WrvJOx9XY2htsW6v97FhTEWTd 3WDAnSEtyx98Rj23HEigpkrBx6KbG64= X-Google-Smtp-Source: AK7set+Q3+jmRTUX+hCvns5fA9ZAT4iysXJmRpJgVpyQjGS+hOf6o2UFHXCkSCOjq1tAkwmJsNRJ1Q== X-Received: by 2002:ac2:4286:0:b0:4b4:8f01:f8b1 with SMTP id m6-20020ac24286000000b004b48f01f8b1mr1731519lfh.31.1677667423184; Wed, 01 Mar 2023 02:43:43 -0800 (PST) Received: from debian.localdomain ([178.127.132.237]) by smtp.googlemail.com with ESMTPSA id z22-20020ac25df6000000b0049c29389b98sm1685602lfq.151.2023.03.01.02.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 02:43:42 -0800 (PST) From: Dzmitry Sankouski To: u-boot@lists.denx.de Cc: Dzmitry Sankouski , Simon Glass Subject: [PATCH v2 1/1] editorconfig: introduce .editorconfig Date: Wed, 1 Mar 2023 13:43:38 +0300 Message-Id: <20230301104338.1744007-2-dsankouski@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230301104338.1744007-1-dsankouski@gmail.com> References: <20230301104338.1744007-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 --- Changes for 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..10fe165f09 --- /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..741bc58b83 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 + 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