Skip to content

Commit

Permalink
Add an editorconfig for code style (#743)
Browse files Browse the repository at this point in the history
Automatically works within github and multiple other editors (with and
without plugins) to enforce and guide code style.
  • Loading branch information
andrewbenton authored and mfiess committed Dec 19, 2017
1 parent 82ce326 commit e7fd88b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

spaces_around_operators = true
indent_brace_style = Allman

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,php}]
charset = utf-8
indent_size = 2

[*.py]
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 8

[{package.json,.travis.yml}]
indent_size = 2

[*.java]
indent_brace_style = Stroustrup

[*.go]
indent_style = tab

[*.{c++,cc,cxx}]
indent_brace_style = Allman

0 comments on commit e7fd88b

Please sign in to comment.