From 45ebaec123b281e91a87c3af1b67662da594c183 Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Nov 03 2021 08:06:56 +0000 Subject: Add a .editorconfig file upstream: fedora resolves: bz2003832 conflict: none commit bcb1176ec6f17538ffff94d2fbd21579938c3c05 Author: Kairui Song Date: Fri Jul 30 01:08:30 2021 +0800 Add a .editorconfig file EditorConfig file is helpful for tools like `shfmt`, also could be a hint for code styling. The code style spec used in this new added .editorconfig file is generated based on existing code style. Following commits will make mkfadumprd, mkdumprd, kdumpctl, kdump-lib.sh, and *-module-setup.sh only be used in first kernel, so use bash syntax for these scripts. Other scripts will use sh syntax for better POSIX compatibility. Signed-off-by: Kairui Song Acked-by: Pingfan Liu Acked-by: Philipp Rudo Signed-off-by: Tao Liu --- diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bd8fc8c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +# EditorConfig configuration for kexec-tools +# http://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Default code style for kexec-tools scripts +[*] +end_of_line = lf +shell_variant = posix +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = tab +indent_size = 1 +switch_case_indent = false +function_next_line = true +binary_next_line = false +space_redirects = true + +# Some scripts will only run with bash +[{mkfadumprd,mkdumprd,kdumpctl}] +shell_variant = bash + +# Use dracut code style for *-module-setup.sh +[*-module-setup.sh] +shell_variant = bash +indent_style = space +indent_size = 4 +switch_case_indent = true +function_next_line = false +binary_next_line = true +space_redirects = true