devtools: add EditorConfig file

EditorConfig is a file format and collection of text editor plugins for
maintaining consistent coding styles between different editors and IDEs.

Initialize the file following the coding rules in
doc/guides/contributing/coding_style.rst,
doc/guides/contributing/documentation.rst and
doc/guides/contributing/patches.rst.

In order for this file to be taken into account (unless they use an
editor with built-in EditorConfig support), developers will have to
install a plugin.

Note: The max_line_length property is only supported by a limited number
of EditorConfig plugins. It will be ignored if unsupported.

Add this new file in MAINTAINERS in the "Developers and Maintainers
Tools" section.

Link: https://editorconfig.org/
Link: https://github.com/editorconfig/editorconfig-emacs
Link: https://github.com/editorconfig/editorconfig-vim
Link: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties#max_line_length

Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
This commit is contained in:
Robin Jarry 2019-10-25 16:04:10 +02:00 committed by Thomas Monjalon
parent 7b6875ba6f
commit 5112e68001
2 changed files with 26 additions and 0 deletions

25
.editorconfig Normal file
View File

@ -0,0 +1,25 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2019 6WIND S.A.
# See https://editorconfig.org/ for syntax reference.
root = true
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
tab_width = 8
max_line_length = 80
[*.py]
indent_style = space
indent_size = 4
[*.rst]
indent_style = space
indent_size = 3
[COMMIT_EDITMSG]
max_line_length = 72

View File

@ -104,6 +104,7 @@ F: devtools/load-devel-config
F: devtools/test-build.sh F: devtools/test-build.sh
F: devtools/test-meson-builds.sh F: devtools/test-meson-builds.sh
F: license/ F: license/
F: .editorconfig
Build System Build System