Skip to content

Commit

Permalink
Add a basic .editorconfig file
Browse files Browse the repository at this point in the history
This just sets some basic file properties; character encoding, line
endings, tabs vs spaces etc and is _not_ a replacement for a code
formatter like indent(1) or clang-format.

Link: <https://editorconfig.org/>
Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Aug 7, 2024
1 parent 3667c3e commit 06c4ea1
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
root = true

[{configure,{*.{c,cpp,h,go,java,js,py,rs}}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

[Makefile]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 8

[{auto/**,*.toml}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yaml]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

0 comments on commit 06c4ea1

Please sign in to comment.