Skip to content

Commit

Permalink
style: Add an EditorConfig file for the C code.
Browse files Browse the repository at this point in the history
EditorConfig lets editors automatically configure themselves to the
project standard. Like embedded VIM and emacs mode lines, but
universal. Many editors support it out of the box. Most everything
else has a plugin. https://editorconfig.org/

It makes contributing with proper style easier. Pretty basic stuff.

* 4 spaces for indentation
* UTF-8
* Unix newlines
* Strip trailing whitespace
* Add a final newline on the file
  • Loading branch information
schwern authored and khwilliamson committed Jan 17, 2021
1 parent b12f49e commit 6867dc0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[**/*.[ch]]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

0 comments on commit 6867dc0

Please sign in to comment.