Skip to content

Commit

Permalink
editorconfig: add initial config file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
evelikov authored and gregkh committed Oct 1, 2024
1 parent ee65ab5 commit 99fcc8f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 99fcc8f

Please sign in to comment.