EditorConfig helps maintain uniform coding styles within a project,
regardless of the editor or IDE used. It uses a specific file format to
define coding styles, and text editor plugins to enforce those styles.
More details can be found at
https://editorconfig.org.
With this commit, an EditorConfig file has been added to align with the
existing coding style in this repository. Most files adhere to a maximum
line length of 80 characters, except for
configure.ac, where the line
length is closer to 100. This EditorConfig file will help ensure that
these styles are consistently followed in the future.
Signed-off-by: Michael Adler <
michae...@siemens.com>
---
.editorconfig | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 .editorconfig
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..35b4038
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,36 @@
+# Copyright (c) Siemens AG, 2023
+#
+# Author: Michael Adler <
michae...@siemens.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2. See
+# the COPYING file in the top-level directory.
+#
+# SPDX-License-Identifier: GPL-2.0
+
+# This file is meant to set up your editor, see
https://editorconfig.org.
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+tab_width = 8
+
+[{Makefile,*.am}]
+indent_style = tab
+indent_size = tab
+trim_trailing_whitespace = true
+max_line_length = 80
+
+[*.{c,h}]
+indent_style = tab
+indent_size = tab
+trim_trailing_whitespace = true
+max_line_length = 80
+
+[
configure.ac]
+indent_style = tab
+indent_size = tab
+tab_width = 8
+trim_trailing_whitespace = true
+max_line_length = 100
--
2.41.0