Skip to content

Commit 5108d4a

Browse files
author
Wilhelm Berg
authored
Add EditorConfig to enforce coding style (#508)
* add inital version of .editorconfig * EditorConfig: add trim_trailing_whitespace * add info about EditorConfig to CHANGELOG * add info about EditorConfig to CODING-STYLE.md
1 parent 8be85d0 commit 5108d4a

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

CODING-STYLE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- Use an IDE that respects `.editorconfig` file (http://editorconfig.org/#download) and you won't have to worry about most of the stuff below :smirk:
2+
13
- Use tabs, not spaces, for indentation.
24

35
- Private fields should be prefixed with an underscore (`_privateField`) and generally avoid `this` keyword.

documentation/docs/05-changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## CHANGELOG
22

3+
### v.?.?.?
4+
*TBD*
5+
6+
#####
7+
- Included EditorConfig file to enforce coding style
8+
39
### v.1.3.0
410
*12/18/2017*
511

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*.cs]
4+
indent_style = tab
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
# avoid "this." if not necessary
9+
dotnet_style_qualification_for_field = false:warning
10+
dotnet_style_qualification_for_property = false:warning
11+
dotnet_style_qualification_for_event = false:warning
12+
13+
# newline settings
14+
csharp_new_line_before_open_brace = all
15+
csharp_new_line_before_else = true
16+
csharp_new_line_before_catch = true
17+
csharp_new_line_before_finally = true
18+
csharp_new_line_before_members_in_object_initializers = true
19+
csharp_new_line_before_members_in_anonymous_types = true
20+
csharp_new_line_between_query_expression_clauses = true

0 commit comments

Comments
 (0)