Skip to content

Commit bb807de

Browse files
committed
update editorconfig and format code.
1 parent 8aca9af commit bb807de

File tree

134 files changed

+5651
-2903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5651
-2903
lines changed

.editorconfig

Lines changed: 177 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,182 @@
1+
# editorconfig.org
12

3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings:
7+
# A newline ending every file
8+
# Use 4 spaces as indentation
29
[*]
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4
13+
trim_trailing_whitespace = true
314

4-
# ReSharper properties
5-
resharper_align_multiline_binary_expressions_chain = false
6-
resharper_blank_lines_around_single_line_auto_property = 0
7-
resharper_blank_lines_around_single_line_field = 0
8-
resharper_blank_lines_before_multiline_statements = 1
9-
resharper_csharp_blank_lines_around_single_line_invocable = 1
10-
resharper_csharp_empty_block_style = together
11-
resharper_csharp_int_align_comments = true
12-
resharper_csharp_keep_blank_lines_in_code = 1
13-
resharper_csharp_keep_blank_lines_in_declarations = 1
14-
resharper_csharp_wrap_after_declaration_lpar = true
15-
resharper_csharp_wrap_after_invocation_lpar = true
16-
resharper_csharp_wrap_arguments_style = chop_if_long
17-
resharper_csharp_wrap_before_declaration_rpar = true
18-
resharper_csharp_wrap_before_invocation_rpar = true
19-
resharper_csharp_wrap_parameters_style = chop_if_long
20-
resharper_int_align_assignments = true
21-
resharper_int_align_fields = true
22-
resharper_int_align_nested_ternary = true
23-
resharper_int_align_parameters = true
24-
resharper_int_align_properties = true
25-
resharper_int_align_property_patterns = true
26-
resharper_int_align_switch_expressions = true
27-
resharper_int_align_switch_sections = true
28-
resharper_int_align_variables = true
29-
resharper_place_accessorholder_attribute_on_same_line = false
30-
resharper_place_expr_method_on_single_line = if_owner_is_single_line
31-
resharper_place_expr_property_on_single_line = true
32-
resharper_place_simple_initializer_on_single_line = false
33-
resharper_show_autodetect_configure_formatting_tip = false
34-
resharper_use_indent_from_vs = false
35-
resharper_wrap_array_initializer_style = chop_always
36-
resharper_wrap_before_arrow_with_expressions = true
37-
resharper_wrap_chained_binary_expressions = chop_if_long
38-
resharper_wrap_object_and_collection_initializer_style = chop_always
39-
resharper_invert_if_highlighting = none
40-
41-
# Microsoft .NET properties
42-
csharp_using_directive_placement = outside_namespace
43-
csharp_new_line_before_members_in_object_initializers = false
44-
csharp_new_line_before_open_brace = none
45-
csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
46-
csharp_style_var_elsewhere = true:suggestion
47-
csharp_style_var_for_built_in_types = true:suggestion
48-
csharp_style_var_when_type_is_apparent = true:suggestion
49-
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
50-
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
51-
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none
52-
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
53-
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
54-
dotnet_style_predefined_type_for_member_access = true:suggestion
55-
dotnet_style_qualification_for_event = false:suggestion
15+
# Generated code
16+
[*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}]
17+
generated_code = true
18+
19+
# C# files
20+
[*.cs]
21+
# New line preferences
22+
csharp_new_line_before_open_brace = all
23+
csharp_new_line_before_else = true
24+
csharp_new_line_before_catch = true
25+
csharp_new_line_before_finally = true
26+
csharp_new_line_before_members_in_object_initializers = true
27+
csharp_new_line_before_members_in_anonymous_types = true
28+
csharp_new_line_between_query_expression_clauses = true
29+
30+
# Indentation preferences
31+
csharp_indent_block_contents = true
32+
csharp_indent_braces = false
33+
csharp_indent_case_contents = true
34+
csharp_indent_case_contents_when_block = false
35+
csharp_indent_switch_labels = true
36+
csharp_indent_labels = one_less_than_current
37+
38+
# Modifier preferences
39+
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
40+
41+
# avoid this. unless absolutely necessary
5642
dotnet_style_qualification_for_field = false:suggestion
57-
dotnet_style_qualification_for_method = false:suggestion
5843
dotnet_style_qualification_for_property = false:suggestion
59-
dotnet_style_require_accessibility_modifiers = never:suggestion
60-
object_creation_when_type_evident = target_typed
61-
object_creation_when_type_not_evident = target_typed
62-
63-
# ReSharper inspection severities
64-
resharper_arrange_redundant_parentheses_highlighting = hint
65-
resharper_arrange_this_qualifier_highlighting = hint
66-
resharper_arrange_type_member_modifiers_highlighting = hint
67-
resharper_arrange_type_modifiers_highlighting = hint
68-
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
69-
resharper_built_in_type_reference_style_highlighting = hint
70-
resharper_redundant_base_qualifier_highlighting = warning
71-
resharper_suggest_var_or_type_built_in_types_highlighting = hint
72-
resharper_suggest_var_or_type_elsewhere_highlighting = hint
73-
resharper_suggest_var_or_type_simple_types_highlighting = hint
74-
resharper_web_config_module_not_resolved_highlighting = warning
75-
resharper_web_config_type_not_resolved_highlighting = warning
76-
resharper_web_config_wrong_module_highlighting = warning
77-
resharper_redundant_using_directive_highlighting = error
78-
79-
[*.{appxmanifest,asax,ascx,aspx,axaml,build,cg,cginc,compute,cs,cshtml,dtd,fs,fsi,fsscript,fsx,hlsl,hlsli,hlslinc,master,ml,mli,nuspec,paml,razor,resw,resx,shader,skin,usf,ush,vb,xaml,xamlx,xoml,xsd}]
80-
indent_style = space
81-
indent_size = 4
82-
tab_width = 4
44+
dotnet_style_qualification_for_method = false:suggestion
45+
dotnet_style_qualification_for_event = false:suggestion
46+
47+
# Types: use keywords instead of BCL types, and permit var only when the type is clear
48+
csharp_style_var_for_built_in_types = false:suggestion
49+
csharp_style_var_when_type_is_apparent = false:none
50+
csharp_style_var_elsewhere = false:suggestion
51+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
52+
dotnet_style_predefined_type_for_member_access = true:suggestion
53+
54+
# name all constant fields using PascalCase
55+
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
56+
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
57+
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
58+
dotnet_naming_symbols.constant_fields.applicable_kinds = field
59+
dotnet_naming_symbols.constant_fields.required_modifiers = const
60+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
61+
62+
# static fields should have s_ prefix
63+
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
64+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
65+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
66+
dotnet_naming_symbols.static_fields.applicable_kinds = field
67+
dotnet_naming_symbols.static_fields.required_modifiers = static
68+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
69+
dotnet_naming_style.static_prefix_style.required_prefix = s_
70+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
71+
72+
# internal and private fields should be _camelCase
73+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
74+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
75+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
76+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
77+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
78+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
79+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
80+
81+
# Code style defaults
82+
csharp_using_directive_placement = outside_namespace:suggestion
83+
dotnet_sort_system_directives_first = true
84+
csharp_prefer_braces = true:silent
85+
csharp_preserve_single_line_blocks = true:none
86+
csharp_preserve_single_line_statements = false:none
87+
csharp_prefer_static_local_function = true:suggestion
88+
csharp_prefer_simple_using_statement = false:none
89+
csharp_style_prefer_switch_expression = true:suggestion
90+
dotnet_style_readonly_field = true:suggestion
91+
92+
# Expression-level preferences
93+
dotnet_style_object_initializer = true:suggestion
94+
dotnet_style_collection_initializer = true:suggestion
95+
dotnet_style_prefer_collection_expression = when_types_exactly_match
96+
dotnet_style_explicit_tuple_names = true:suggestion
97+
dotnet_style_coalesce_expression = true:suggestion
98+
dotnet_style_null_propagation = true:suggestion
99+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
100+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
101+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
102+
dotnet_style_prefer_auto_properties = true:suggestion
103+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
104+
dotnet_style_prefer_conditional_expression_over_return = true:silent
105+
csharp_prefer_simple_default_expression = true:suggestion
106+
107+
# Expression-bodied members
108+
csharp_style_expression_bodied_methods = true:silent
109+
csharp_style_expression_bodied_constructors = true:silent
110+
csharp_style_expression_bodied_operators = true:silent
111+
csharp_style_expression_bodied_properties = true:silent
112+
csharp_style_expression_bodied_indexers = true:silent
113+
csharp_style_expression_bodied_accessors = true:silent
114+
csharp_style_expression_bodied_lambdas = true:silent
115+
csharp_style_expression_bodied_local_functions = true:silent
116+
117+
# Pattern matching
118+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
119+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
120+
csharp_style_inlined_variable_declaration = true:suggestion
121+
122+
# Null checking preferences
123+
csharp_style_throw_expression = true:suggestion
124+
csharp_style_conditional_delegate_call = true:suggestion
125+
126+
# Other features
127+
csharp_style_prefer_index_operator = false:none
128+
csharp_style_prefer_range_operator = false:none
129+
csharp_style_pattern_local_over_anonymous_function = false:none
130+
131+
# Space preferences
132+
csharp_space_after_cast = false
133+
csharp_space_after_colon_in_inheritance_clause = true
134+
csharp_space_after_comma = true
135+
csharp_space_after_dot = false
136+
csharp_space_after_keywords_in_control_flow_statements = true
137+
csharp_space_after_semicolon_in_for_statement = true
138+
csharp_space_around_binary_operators = before_and_after
139+
csharp_space_around_declaration_statements = do_not_ignore
140+
csharp_space_before_colon_in_inheritance_clause = true
141+
csharp_space_before_comma = false
142+
csharp_space_before_dot = false
143+
csharp_space_before_open_square_brackets = false
144+
csharp_space_before_semicolon_in_for_statement = false
145+
csharp_space_between_empty_square_brackets = false
146+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
147+
csharp_space_between_method_call_name_and_opening_parenthesis = false
148+
csharp_space_between_method_call_parameter_list_parentheses = false
149+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
150+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
151+
csharp_space_between_method_declaration_parameter_list_parentheses = false
152+
csharp_space_between_parentheses = false
153+
csharp_space_between_square_brackets = false
154+
155+
# Xml project files
156+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
157+
indent_size = 2
158+
159+
[*.{csproj,vbproj,proj,nativeproj,locproj}]
160+
charset = utf-8
161+
162+
# Xml build files
163+
[*.builds]
164+
indent_size = 2
165+
166+
# Xml files
167+
[*.{xml,stylecop,resx,ruleset}]
168+
indent_size = 2
169+
170+
# Xml config files
171+
[*.{props,targets,config,nuspec}]
172+
indent_size = 2
173+
174+
# YAML config files
175+
[*.{yml,yaml}]
176+
indent_size = 2
177+
178+
# Shell scripts
179+
[*.sh]
180+
end_of_line = lf
181+
[*.{cmd,bat}]
182+
end_of_line = crlf

src/AlibabaCloud.OSS.V2/Client.BucketAcl.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
using System.Threading.Tasks;
55
using AlibabaCloud.OSS.V2.Transform;
66

7-
namespace AlibabaCloud.OSS.V2 {
8-
public partial class Client {
7+
namespace AlibabaCloud.OSS.V2
8+
{
9+
public partial class Client
10+
{
911
/// <summary>
1012
/// Configures or modifies the access control list (ACL) for a bucket.
1113
/// </summary>
@@ -17,11 +19,13 @@ public partial class Client {
1719
Models.PutBucketAclRequest request,
1820
OperationOptions? options = null,
1921
CancellationToken cancellationToken = default
20-
) {
22+
)
23+
{
2124
Ensure.NotNull(request.Bucket, "request.Bucket");
2225
Ensure.NotNull(request.Acl, "request.Acl");
2326

24-
var input = new OperationInput {
27+
var input = new OperationInput
28+
{
2529
OperationName = "PutBucketAcl",
2630
Method = "PUT",
2731
Headers = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) {
@@ -55,10 +59,12 @@ public partial class Client {
5559
Models.GetBucketAclRequest request,
5660
OperationOptions? options = null,
5761
CancellationToken cancellationToken = default
58-
) {
62+
)
63+
{
5964
Ensure.NotNull(request.Bucket, "request.Bucket");
6065

61-
var input = new OperationInput {
66+
var input = new OperationInput
67+
{
6268
OperationName = "GetBucketAcl",
6369
Method = "GET",
6470
Parameters = new Dictionary<string, string> {
@@ -78,4 +84,4 @@ public partial class Client {
7884
return (Models.GetBucketAclResult)result;
7985
}
8086
}
81-
}
87+
}

0 commit comments

Comments
 (0)