Skip to content

Commit 874e157

Browse files
committed
Add .editorconfig to tell editors/IDEs basic whitespace rules.
https://editorconfig.org/ is a common file that is understood by virtually all editors and IDES that deal with code. With this file, contributors to the code-base already have a good head-start complying with the expected formatting rules. Note, this also includes a trim_trailing_whitespace setting, that will remove random whitespace at end of lines, which will reduce merge conflicts on such lines. Some existing files have spurious whitespace at the end of lines, so whenever they are edited first under .editorconfig configuration they will be cleaned up. Signed-off-by: Henner Zeller <[email protected]>
1 parent fa683da commit 874e157

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor config file, see http://editorconfig.org/
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.{h,c,cpp}]
11+
indent_style = space
12+
indent_size = 4
13+

0 commit comments

Comments
 (0)