[v2] devtools: add EditorConfig file
diff mbox series

Message ID 20191025140410.1302-1-robin.jarry@6wind.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • [v2] devtools: add EditorConfig file
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed

Commit Message

Robin Jarry Oct. 25, 2019, 2:04 p.m. UTC
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
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: Keith Wiles <keith.wiles@intel.com>
Cc: Ray Kinsella <mdr@ashroe.eu>
Cc: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
---
Changelog:

v2:

- Add link to editorconfig.org in file for syntax reference.
- Use [*.EXT] syntax for section headers (as shown on home page).
- Add trim_trailing_whitespace option.

 .editorconfig | 25 +++++++++++++++++++++++++
 MAINTAINERS   |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 .editorconfig

--
2.23.0

Comments

Thomas Monjalon Feb. 22, 2020, 8:03 p.m. UTC | #1
25/10/2019 16:04, Robin Jarry:
> 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
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Anatoly Burakov <anatoly.burakov@intel.com>
> Cc: Keith Wiles <keith.wiles@intel.com>
> Cc: Ray Kinsella <mdr@ashroe.eu>
> Cc: Andrew Rybchenko <arybchenko@solarflare.com>
> Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
> ---
> Changelog:
> 
> v2:
> 
> - Add link to editorconfig.org in file for syntax reference.
> - Use [*.EXT] syntax for section headers (as shown on home page).
> - Add trim_trailing_whitespace option.

This patch was forgotten, sorry.

Applied, thanks it looks to be a good addition.

Patch
diff mbox series

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..d70582557497
--- /dev/null
+++ b/.editorconfig
@@ -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
diff --git a/MAINTAINERS b/MAINTAINERS
index f8a56e2e2615..16b4eb18cafa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -82,6 +82,7 @@  F: doc/

 Developers and Maintainers Tools
 M: Thomas Monjalon <thomas@monjalon.net>
+F: .editorconfig
 F: MAINTAINERS
 F: devtools/check-dup-includes.sh
 F: devtools/check-maintainers.sh