Skip to contentSkip to conversation

introduce .editorconfig

PATCH Superseded Dzmitry Sankouski 2 participants 3 messages Feb 28, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover introduce .editorconfig

Current process of sending patches includes running checkpatch.pl script for each patch, and fixing found style problems. Editorconfig may help to prevent some style related problems (like spaces vs tab indentation) on the fly.

Dzmitry Sankouski (1):
editorconfig: introduce .editorconfig

 .editorconfig | 19 +++++++++++++++++++
 .gitignore    |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 .editorconfig
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 editorconfig: introduce .editorconfig

Current process of sending patches includes running checkpatch.pl script for each patch, and fixing found style problems. Editorconfig may help to prevent some style related problems (like spaces vs tab indentation) on the fly.

---
 .editorconfig | 19 +++++++++++++++++++
 .gitignore    |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 .editorconfig
.editorconfig new file +19 -0
new file mode 100644
index 0000000000..b8a413fda1
@@ -0,0 +1,19 @@
+; This file is for unifying the coding style for different editors and IDEs.
+; Plugins are available for notepad++, emacs, vim, gedit,
+; textmate, visual studio, and more.
+;
+; See http://editorconfig.org for details.
+
+# Top-most EditorConfig file.
+root = true
+
+[{**.c, **.h}]
+indent_style = tab
+indent_size=8
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[**Kconfig]
+indent_size=4
+
.gitignore +1 -0
index 3a4d056edf..ed8ca226fe 100644
@@ -7,6 +7,7 @@
 #
 .*
 !.checkpatch.conf
+!.editorconfig
 *.a
 *.asn1.[ch]
 *.bin
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH 1/1] editorconfig: introduce .editorconfig

Hi Dzmitry,

Quoted 10 lines · Dzmitry Sankouski

Current process of sending patches includes running checkpatch.pl script for each patch, and fixing found style problems. Editorconfig may help to prevent some style related problems (like spaces vs tab indentation) on the fly.

---
 .editorconfig | 19 +++++++++++++++++++
 .gitignore    |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 .editorconfig

You could add .rst files as well.

Quoted 9 lines
.editorconfig new file +2 -0
new file mode 100644
index 0000000000..b8a413fda1
@@ -0,0 +1,19 @@
+; This file is for unifying the coding style for different editors and IDEs.
+; Plugins are available for notepad++, emacs, vim, gedit,

.editorconfig line 12

Quoted 10 lines
.editorconfig new file +10 -0
+; textmate, visual studio, and more.
+;
+; See http://editorconfig.org for details.
+
+# Top-most EditorConfig file.
+root = true
+
+[{**.c, **.h}]
+indent_style = tab
+indent_size=8

consistent spacing?

.editorconfig line 18

Quoted 6 lines
.editorconfig new file +6 -0
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[**Kconfig]
+indent_size=4

consistent spacing?

Quoted 14 lines
.editorconfig new file +1 -0
+
.gitignore +1 -1
index 3a4d056edf..ed8ca226fe 100644
@@ -7,6 +7,7 @@
 #
 .*
 !.checkpatch.conf
+!.editorconfig
 *.a
 *.asn1.[ch]
 *.bin
--
Quoted 2 lines

2.30.2

Regards,
Simon