From 8dc44051b3da0c8c84403b2e132f2c4f483f85b3 Mon Sep 17 00:00:00 2001 From: ryan bridges Date: Fri, 5 Dec 2014 09:49:09 -0500 Subject: [PATCH 1/2] Adding editorconfig settings file to help with consistent formatting --- stack/.editorconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 stack/.editorconfig diff --git a/stack/.editorconfig b/stack/.editorconfig new file mode 100644 index 0000000000..21ba8b8e6f --- /dev/null +++ b/stack/.editorconfig @@ -0,0 +1,19 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 +continuation_indent_size = 4 +max_line_length = 80 + +# java +[*.java] +curly_bracket_next_line = false +spaces_around_brackets = both +spaces_around_operators = true From f153cda7cd820dcc57127d8a65f53389bb5dfde0 Mon Sep 17 00:00:00 2001 From: ryan bridges Date: Fri, 5 Dec 2014 10:08:26 -0500 Subject: [PATCH 2/2] Added comments to configuration options. removed 'root' declaration --- stack/.editorconfig | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/stack/.editorconfig b/stack/.editorconfig index 21ba8b8e6f..cc4e3a0fa2 100644 --- a/stack/.editorconfig +++ b/stack/.editorconfig @@ -1,19 +1,26 @@ -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file [*] +# Unix-style newlines with a newline ending every file end_of_line = lf +# New line at the end of every file insert_final_newline = true +# set default character set to utf-8 charset = utf-8 +# Trim trailing whitespace from the end of lines trim_trailing_whitespace = true +# Use spaces instead of tabs indent_style = space +# Indent new lines with 4 spaces indent_size = 4 +# Lines that are a continuation of the previous line get an extra 4 spaces continuation_indent_size = 4 -max_line_length = 80 +# Set the maximum line length to 120 +max_line_length = 120 # java [*.java] +# Do not move curly braces to the next line curly_bracket_next_line = false +# Add a space before and after brackets "[],{},()" spaces_around_brackets = both +# Add a space on either side of an operator spaces_around_operators = true