introduce .editorconfig
v2 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 | 15 +++++++++++++++ .gitignore | 1 + doc/develop/codingstyle.rst | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 .editorconfig
Signature · 1 line
2.30.2
PATCH v2 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.
---
Changes for v2:
- add section in coding style rst doc
- unify Kconfig with other files
.editorconfig | 15 +++++++++++++++ .gitignore | 1 + doc/develop/codingstyle.rst | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 .editorconfig
.editorconfig new file +15 -0
@@ -0,0 +1,15 @@ +; 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, **Kconfig}] +indent_style = tab +indent_size=8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true
.gitignore +1 -0
@@ -7,6 +7,7 @@ # .* !.checkpatch.conf +!.editorconfig *.a *.asn1.[ch] *.bin
doc/develop/codingstyle.rst +4 -0
@@ -27,6 +27,10 @@ The following rules apply: more information, read :doc:`checkpatch`. Note that this should be done *before* posting on the mailing list! +* Some code style rules may be applied automatically by your editor using + EditorConfig tool. Feel free to setup your editor to work with u-boot's + .editorconfig. + * Source files originating from different projects (for example the MTD subsystem or the hush shell code from the BusyBox project) may, after careful consideration, be exempted from these rules. For such files, the
Signature · 1 line
2.30.2
Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
Quoted 25 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.
Reviewed-by Simon Glass <[email protected]>---
Changes for v2:
- add section in coding style rst doc
- unifyKconfigwith other files.editorconfig | 15 +++++++++++++++ .gitignore | 1 + doc/develop/codingstyle.rst | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 .editorconfig.editorconfig new file +2
-0@@ -0,0 +1,15 @@ +; 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, **Kconfig}] +indent_style = tab +indent_size=8
As Simon noted before, this should be " = 8".
Quoted 20 lines
.editorconfig new file +3
-0+end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true.gitignore +1
-0@@ -7,6 +7,7 @@ # .* !.checkpatch.conf +!.editorconfig *.a *.asn1.[ch] *.bindoc/develop/codingstyle.rst +0
-0
doc/develop/codingstyle.rst The following rules apply: · line 30
Quoted 4 lines
doc/develop/codingstyle.rst +1
-0@@ -27,6 +27,10 @@ The following rules apply: more information, read :doc:`checkpatch`. Note that this should be done *before* posting on the mailing list! +* Some code style rules may be applied automatically by your editor using
"using the"
Quoted 1 line
doc/develop/codingstyle.rst +1
-0+ EditorConfig tool. Feel free to setup your editor to work with u-boot's
Signature · 1 line
Tom
Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
ср, 1 мар. 2023 г. в 18:58, Tom Rini <[email protected]>:
Quoted 31 lines · Dzmitry Sankouski
Quoted 29 lines
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.
Reviewed-by Simon Glass <[email protected]>---
Changes for v2:
- add section in coding style rst doc
- unifyKconfigwith other files.editorconfig | 15 +++++++++++++++ .gitignore | 1 + doc/develop/codingstyle.rst | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 .editorconfig.editorconfig new file +6
-0@@ -0,0 +1,15 @@ +; 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. +
Quoted 9 lines
.editorconfig line 12
Quoted 6 lines
.editorconfig new file +6
-0+# Top-most EditorConfig file. +root = true + +[{**.c, **.h, **Kconfig}] +indent_style = tab +indent_size=8As Simon noted before, this should be " = 8".
oops, I thought he meant consistent spacing in a sense of 8 spaces. I personally like Kconfigs with 4 indent more.
Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
Quoted 41 lines · Dzmitry Sankouski
ср, 1 мар. 2023 г. в 18:58, Tom Rini <[email protected]>:
Quoted 31 lines · Dzmitry Sankouski
Quoted 29 lines
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.
Reviewed-by Simon Glass <[email protected]>---
Changes for v2:
- add section in coding style rst doc
- unifyKconfigwith other files.editorconfig | 15 +++++++++++++++ .gitignore | 1 + doc/develop/codingstyle.rst | 4 ++++ 3 files changed, 20 insertions(+) create mode 100644 .editorconfig.editorconfig new file +6
-0@@ -0,0 +1,15 @@ +; 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. +Quoted 9 lines
.editorconfig line 12
Quoted 6 lines
.editorconfig new file +6
-0+# Top-most EditorConfig file. +root = true + +[{**.c, **.h, **Kconfig}] +indent_style = tab +indent_size=8As Simon noted before, this should be " = 8".
Quoted 2 lines
oops, I thought he meant consistent spacing in a sense of 8 spaces. I personally like Kconfigs with 4 indent more.
Ah. But, in both cases it should be 8, as well.
Signature · 1 line
Tom
Re: [PATCH v2 1/1] editorconfig: introduce .editorconfig
In reply to Dzmitry SankouskiHi Dzmitry,
Quoted 7 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.
Reviewed-by Simon Glass <[email protected]>
You missed giving your Signed-off-by tag.