Skip to content

Commit

Permalink
chore: introduce editorconfig for consistent coding styles
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
michaeladler authored and jan-kiszka committed Aug 8, 2023
1 parent d977fa4 commit 39b205f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) Siemens AG, 2023
#
# Author: Michael Adler <[email protected]>
#
# 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

0 comments on commit 39b205f

Please sign in to comment.