Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

From: Todd Richmond

Update sun.cfg and update test results from the latest patch.
  • Loading branch information...
commit 867f0f7dad29a9ab08e2394140e43749f3e4c3fb 1 parent 2e95b3c
Ben Gardner authored
87 etc/sun.cfg
View
@@ -27,7 +27,7 @@ tok_split_gte = false # false/true
# Control what to do with the UTF-8 BOM (recommed 'remove')
utf8_bom = ignore # ignore/add/remove/force
-# If the file only contains chars between 128 and 255 and is not UTF-8, then output as UTF-8
+# If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8
utf8_byte = false # false/true
# Force the output encoding to UTF-8
@@ -53,7 +53,7 @@ indent_with_tabs = 2 # number
# Comments that are not a brace level are indented with tabs on a tabstop.
# Requires indent_with_tabs=2. If false, will use spaces.
-indent_cmt_with_tabs = true # false/true
+indent_cmt_with_tabs = false # false/true
# Whether to indent strings broken by '\' so that they line up
indent_align_string = false # false/true
@@ -308,7 +308,7 @@ sp_before_angle = remove # ignore/add/remove/force
sp_inside_angle = remove # ignore/add/remove/force
# Add or remove space after '<>'
-sp_after_angle = remove # ignore/add/remove/force
+sp_after_angle = force # ignore/add/remove/force
# Add or remove space between '<>' and '(' as found in 'new List<byte>();'
sp_angle_paren = remove # ignore/add/remove/force
@@ -652,7 +652,7 @@ align_func_params = false # false/true
align_same_func_call_params = false # false/true
# The span for aligning variable definitions (0=don't align)
-align_var_def_span = 2 # number
+align_var_def_span = 4 # number
# How to align the star in variable definitions.
# 0=Part of the type 'void * foo;'
@@ -667,7 +667,7 @@ align_var_def_star_style = 1 # number
align_var_def_amp_style = 1 # number
# The threshold for aligning variable definitions (0=no limit)
-align_var_def_thresh = 20 # number
+align_var_def_thresh = 10 # number
# The gap for aligning variable definitions
align_var_def_gap = 0 # number
@@ -694,7 +694,7 @@ align_enum_equ_span = 0 # number
align_enum_equ_thresh = 0 # number
# The span for aligning struct/union (0=don't align)
-align_var_struct_span = 1 # number
+align_var_struct_span = 0 # number
# The threshold for aligning struct/union member definitions (0=no limit)
align_var_struct_thresh = 0 # number
@@ -709,7 +709,7 @@ align_struct_init_span = 0 # number
align_typedef_gap = 1 # number
# The span for aligning single-line typedefs (0=don't align)
-align_typedef_span = 2 # number
+align_typedef_span = 4 # number
# How to align typedef'd functions with other typedefs
# 0: Don't mix them at all
@@ -730,7 +730,7 @@ align_typedef_star_style = 1 # number
align_typedef_amp_style = 1 # number
# The span for aligning comments that end lines (0=don't align)
-align_right_cmt_span = 1 # number
+align_right_cmt_span = 4 # number
# If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
align_right_cmt_mix = false # false/true
@@ -772,14 +772,17 @@ align_oc_msg_spec_span = 1 # number
# This will not work right if the macro contains a multi-line comment.
align_nl_cont = false # false/true
+# Align macro functions and variables together
+align_pp_define_together = true # false/true
+
# The minimum space between label and value of a preprocessor define
align_pp_define_gap = 1 # number
# The span for aligning on '#define' bodies (0=don't align)
-align_pp_define_span = 1 # number
+align_pp_define_span = 8 # number
# Align lines that start with '<<' with previous '<<'. Default=true
-align_left_shift = true # false/true
+align_left_shift = false # false/true
# Span for aligning parameters in an Obj-C message call on the ':' (0=don't align)
align_oc_msg_colon_span = 0 # number
@@ -833,9 +836,34 @@ nl_assign_square = remove # ignore/add/remove/force
# Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
nl_after_square_assign = remove # ignore/add/remove/force
-# The number of blank lines after a block of variable definitions
+# The number of blank lines after a block of variable definitions at the top of a function body
+# 0 = No change (default)
nl_func_var_def_blk = 1 # number
+# The number of newlines before a block of typedefs
+# 0 = No change (default)
+nl_typedef_blk_start = 2 # number
+
+# The number of newlines after a block of typdefs
+# 0 = No change (default)
+nl_typedef_blk_end = 2 # number
+
+# The max number of newlines within a block of typedefs
+# 0 = No change (default)
+nl_typedef_blk_in = 1 # number
+
+# The number of newlines before a block of variable definitions not at the top of a function body
+# 0 = No change (default)
+nl_var_def_blk_start = 2 # number
+
+# The number of newlines after a block of variable definitions not at the top of a function body
+# 0 = No change (default)
+nl_var_def_blk_end = 2 # number
+
+# The maximum consecutive newlines within a block of variable definitions
+# 0 = No change (default)
+nl_var_def_blk_in = 1 # number
+
# Add or remove newline between a function call's ')' and '{', as in:
# list_for_each(item, &list) { }
nl_fcall_brace = remove # ignore/add/remove/force
@@ -919,7 +947,7 @@ nl_before_case = false # false/true
nl_before_throw = force # ignore/add/remove/force
# Whether to put a newline after 'case' statement
-nl_after_case = false # false/true
+nl_after_case = true # false/true
# Add or remove a newline between a case ':' and '{'. Overrides nl_after_case.
nl_case_colon_brace = remove # ignore/add/remove/force
@@ -928,7 +956,7 @@ nl_case_colon_brace = remove # ignore/add/remove/force
nl_namespace_brace = remove # ignore/add/remove/force
# Add or remove newline between 'template<>' and whatever follows.
-nl_template_class = ignore # ignore/add/remove/force
+nl_template_class = remove # ignore/add/remove/force
# Add or remove newline between 'class' and '{'
nl_class_brace = remove # ignore/add/remove/force
@@ -1002,7 +1030,7 @@ nl_after_return = false # false/true
nl_return_expr = remove # ignore/add/remove/force
# Whether to put a newline after semicolons, except in 'for' statements
-nl_after_semicolon = false # false/true
+nl_after_semicolon = true # false/true
# Whether to put a newline after brace open.
# This also adds a newline before the matching brace close.
@@ -1026,7 +1054,7 @@ nl_after_brace_close = true # false/true
# Whether to put a newline after a virtual brace close.
# Would add a newline before return in: 'if (foo) a++; return;'
-nl_after_vbrace_close = false # false/true
+nl_after_vbrace_close = true # false/true
# Whether to alter newlines in '#define' macros
nl_define_macro = false # false/true
@@ -1092,29 +1120,29 @@ nl_create_while_one_liner = false # false/true
#
# The position of arithmetic operators in wrapped expressions
-pos_arith = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_arith = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of assignment in wrapped expressions.
# Do not affect '=' followed by '{'
-pos_assign = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_assign = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of boolean operators in wrapped expressions
-pos_bool = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_bool = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of comparison operators in wrapped expressions
-pos_compare = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_compare = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of conditional (b ? t : f) operators in wrapped expressions
-pos_conditional = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_conditional = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of the comma in wrapped expressions
-pos_comma = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_comma = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of the comma in the constructor initialization list
-pos_class_comma = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_class_comma = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
# The position of colons between constructor and member initialization
-pos_class_colon = trail # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_class_colon = join # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force
#
# Line Splitting options
@@ -1129,6 +1157,9 @@ ls_for_split_full = false # false/true
# Whether to fully split long function protos/calls at commas
ls_func_split_full = false # false/true
+# Whether to split lines as close to code_width as possible and ignore some groupings
+ls_code_width = true # false/true
+
#
# Blank line options
#
@@ -1164,7 +1195,7 @@ nl_before_c_comment = 1 # number
nl_before_cpp_comment = 1 # number
# Whether to force a newline after a multi-line comment.
-nl_after_multiline_comment = false # false/true
+nl_after_multiline_comment = true # false/true
# The number of newlines after '}' or ';' of a struct/enum/union definition
nl_after_struct = 2 # number
@@ -1206,12 +1237,18 @@ eat_blanks_after_open_brace = true # false/true
# Whether to remove blank lines before '}'
eat_blanks_before_close_brace = true # false/true
+# How aggressively to remove extra newlines not in preproc.
+# 0: No change
+# 1: Remove most newlines not handled by other config
+# 2: Remove all newlines and reformat completely by config
+nl_remove_extra_newlines = 1 # number
+
#
# Code modifying options (non-whitespace)
#
# Add or remove braces on single-line 'do' statement
-mod_full_brace_do = remove # ignore/add/remove/force
+mod_full_brace_do = force # ignore/add/remove/force
# Add or remove braces on single-line 'for' statement
mod_full_brace_for = remove # ignore/add/remove/force
1  tests/output/cpp/30021-byref.cpp
View
@@ -39,6 +39,7 @@ template<class T> class ListManager
const Foo& Foo::operator ==(Foo& me)
{
::sockaddr *ptr = (::sockaddr *)&host;
+
return(me);
}
1  tests/output/d/40006-Lexer.d
View
@@ -1600,6 +1600,7 @@ class Lexer
int i;
TOK result;
int base;
+
stringbuffer.offset = 0;
// stringbuffer.data = null;
STATE state = STATE.STATE_initial;
1  tests/output/d/40007-Lexer.d
View
@@ -1540,6 +1540,7 @@ L1:
int i;
TOK result;
int base;
+
stringbuffer.offset = 0;
// stringbuffer.data = null;
STATE state = STATE.STATE_initial;
Please sign in to comment.
Something went wrong with that request. Please try again.