From: Timothy Day Date: Wed, 22 Nov 2023 20:23:41 +0000 (+0000) Subject: LU-6142 misc: add editorconfig file X-Git-Tag: 2.15.60~67 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=172d090750a7a59eb13dcec2f7c73d146f3faa6f;p=fs%2Flustre-release.git LU-6142 misc: add editorconfig file EditorConfig is a unified configuration file recognized by dozens of different text editors. This patch adds a very simple config. https://editorconfig.org/ There is an upstream patch discussing editorconfig: https://lkml.org/lkml/2023/6/1/196 This patch aims to be much simpler. EditorConfig must be enabled for many common editors (Emacs, Vim) and is enabled by default (but can be disabled) for other editors (NeoVim). Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I264377f96d6d155f92336083160a392edfc79a4f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53211 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9ebadc7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0 + +# +# This file is part of Lustre, http://www.lustre.org/ +# +# .editorconfig +# +# EditorConfig for Lustre: https://editorconfig.org +# + +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +indent_size = 8 +indent_style = tab +max_line_length = 80 + +# C style config +[*.{c,cpp,h}] +indent_size = 8 +indent_style = tab + +# Python style config +[*.py] +indent_size = 8 +indent_style = tab