-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an editorconfig for code style (#743)
Automatically works within github and multiple other editors (with and without plugins) to enforce and guide code style.
- Loading branch information
1 parent
82ce326
commit e7fd88b
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |