editorconfig: add initial config file

Most editors support the config format out of the box and with some
patches in the works, it's great to have something in-tree to avoid
(further) mixing the style.

The format is sufficient to handle basic indentation size/style and line
length. More elaborate style tracking can be done with clang-format...
incoming with a later patch.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
Emil Velikov 2024-10-01 13:54:02 +01:00 committed by Greg Kroah-Hartman
parent ee65ab5263
commit 99fcc8f5ed

28
.editorconfig Normal file
View File

@ -0,0 +1,28 @@
# SPDX-FileCopyrightText: 2024 Emil Velikov <emil.l.velikov@gmail.com>
#
# SPDX-License-Identifier: LGPL-2.1-or-later
# To use this config on you editor, follow the instructions at:
# http://editorconfig.org
root = true
[*]
charset = utf-8
insert_final_newline = true
tab_width = 8
[*.{c,h}]
indent_style = tab
max_line_length = 80
[*.yml]
indent_style = space
indent_size = 2
[*.patch]
trim_trailing_whitespace = false
[{meson.build,meson_options.txt}]
indent_style = space
indent_size = 2