From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 13E053858430 for ; Thu, 27 Jan 2022 20:15:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 13E053858430 X-ASG-Debug-ID: 1643314510-0c856e06ab2628c0001-Lwtx7q Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id nrTE3qGDAsfwKjOu (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Jan 2022 15:15:10 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id 650FE441B21; Thu, 27 Jan 2022 15:15:10 -0500 (EST) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Simon Marchi Subject: [PATCH] Add top-level .editorconfig file Date: Thu, 27 Jan 2022 15:15:08 -0500 X-ASG-Orig-Subj: [PATCH] Add top-level .editorconfig file Message-Id: <20220127201508.2170906-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1643314510 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2332 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.95613 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Spam-Status: No, score=-3612.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, KAM_SHORT, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2022 20:15:22 -0000 Add a .editorconfig [1] file. This helps configure editors automatically with the right whitespace settings. It will help me, since I need to juggle with different whitespace settings for different projects. But I think it can also help newcomers get things right from the start. Some editors have native support for reading these files, while others require a plug-in [2]. And if you don't want to use it, then this file doesn't change anything to your life. I added rules for the kinds of files I edit most often, but more can be added later. I assumed that the rules were the same for GDB and the other projects, but if that's not the case, we can always put .editorconfig files in project subdirectories to override settings. [1] https://editorconfig.org/ [2] https://editorconfig.org/#download Change-Id: Ifda136d13877fafcf0d137fec8501f6a34e1367b --- .editorconfig | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..4f84b9a0c3b6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,41 @@ +# Copyright 2022 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +root = true + +[*] +end_of_line = lf +insert_final_newline = true +tab_width = 8 + +# Makefile +[{Makefile*,*.mk}] +indent_style = tab +indent_size = 8 + +# C/C++ +[*.{c,h,cc}] +indent_style = tab +indent_size = 2 + +# Expect / TCL +[*.{exp,tcl}] +indent_style = tab +indent_size = 4 + +# Python +[*.py] +indent_style = space +indent_size = 4 base-commit: 0d8cbc5f2fcbcb9eb207f12507fdfe04f3d3ae14 -- 2.34.1