| 1 |
# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 |
# contributor license agreements. See the NOTICE file distributed with |
| 3 |
# this work for additional information regarding copyright ownership. |
| 4 |
# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 |
# (the "License"); you may not use this file except in compliance with |
| 6 |
# the License. You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
root = true |
| 17 |
|
| 18 |
[*] |
| 19 |
charset = utf-8 |
| 20 |
end_of_line = lf |
| 21 |
insert_final_newline = true |
| 22 |
ij_any_block_comment_at_first_column = false |
| 23 |
ij_any_line_comment_at_first_column = false |
| 24 |
|
| 25 |
[*.{java,xml,sh}] |
| 26 |
indent_style = space |
| 27 |
indent_size = 2 |
| 28 |
trim_trailing_whitespace=true |
| 29 |
|
| 30 |
ij_continuation_indent_size = 4 |
| 31 |
ij_java_wrap_comments = true |
| 32 |
ij_any_indent_case_from_switch = false |
| 33 |
|
| 34 |
[*.{avsc,avpr,avdl}] |
| 35 |
indent_style = space |
| 36 |
indent_size = 2 |
| 37 |
trim_trailing_whitespace=true |
| 38 |
|
| 39 |
ij_continuation_indent_size = 4 |
| 40 |
ij_json_space_after_colon = true |
| 41 |
ij_json_space_before_colon = true |
| 42 |
ij_json_spaces_within_brackets = true |
| 43 |
ij_any_array_initializer_wrap = off |
| 44 |
|
| 45 |
[*.{ps1}] |
| 46 |
indent_style = space |
| 47 |
indent_size = 4 |
| 48 |
trim_trailing_whitespace=true |
| 49 |
|
| 50 |
#[*.scala] |
| 51 |
#indent_style = space |
| 52 |
#indent_size = 2 |
| 53 |
|
| 54 |
[*.py] |
| 55 |
indent_style = space |
| 56 |
indent_size = 4 |
| 57 |
|
| 58 |
# Generated code |
| 59 |
[*{_AssemblyInfo.cs,.notsupported.cs,AsmOffsets.cs}] |
| 60 |
generated_code = true |
| 61 |
|
| 62 |
# C# files |
| 63 |
[*.cs] |
| 64 |
indent_style = space |
| 65 |
indent_size = 4 |
| 66 |
trim_trailing_whitespace=true |
| 67 |
|
| 68 |
# New line preferences |
| 69 |
csharp_new_line_before_open_brace = all |
| 70 |
csharp_new_line_before_else = true |
| 71 |
csharp_new_line_before_catch = true |
| 72 |
csharp_new_line_before_finally = true |
| 73 |
csharp_new_line_before_members_in_object_initializers = true |
| 74 |
csharp_new_line_before_members_in_anonymous_types = true |
| 75 |
csharp_new_line_between_query_expression_clauses = true |
| 76 |
|
| 77 |
# Indentation preferences |
| 78 |
csharp_indent_block_contents = true |
| 79 |
csharp_indent_braces = false |
| 80 |
csharp_indent_case_contents = true |
| 81 |
csharp_indent_case_contents_when_block = true |
| 82 |
csharp_indent_switch_labels = true |
| 83 |
csharp_indent_labels = one_less_than_current |
| 84 |
|
| 85 |
# Modifier preferences |
| 86 |
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion |
| 87 |
|
| 88 |
# avoid this. unless absolutely necessary |
| 89 |
dotnet_style_qualification_for_field = false:suggestion |
| 90 |
dotnet_style_qualification_for_property = false:suggestion |
| 91 |
dotnet_style_qualification_for_method = false:suggestion |
| 92 |
dotnet_style_qualification_for_event = false:suggestion |
| 93 |
|
| 94 |
# Types: use keywords instead of BCL types, and permit var only when the type is clear |
| 95 |
csharp_style_var_for_built_in_types = false:suggestion |
| 96 |
csharp_style_var_when_type_is_apparent = false:none |
| 97 |
csharp_style_var_elsewhere = false:suggestion |
| 98 |
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion |
| 99 |
dotnet_style_predefined_type_for_member_access = true:suggestion |
| 100 |
|
| 101 |
# Non-private static fields are PascalCase |
| 102 |
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion |
| 103 |
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields |
| 104 |
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style |
| 105 |
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field |
| 106 |
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected |
| 107 |
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static |
| 108 |
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case |
| 109 |
|
| 110 |
# Constants are PascalCase |
| 111 |
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion |
| 112 |
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants |
| 113 |
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style |
| 114 |
dotnet_naming_symbols.constants.applicable_kinds = field, local |
| 115 |
dotnet_naming_symbols.constants.required_modifiers = const |
| 116 |
dotnet_naming_style.constant_style.capitalization = pascal_case |
| 117 |
|
| 118 |
# Static fields are camelCase and start with s_ |
| 119 |
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion |
| 120 |
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields |
| 121 |
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style |
| 122 |
dotnet_naming_symbols.static_fields.applicable_kinds = field |
| 123 |
dotnet_naming_symbols.static_fields.required_modifiers = static |
| 124 |
dotnet_naming_style.static_field_style.capitalization = camel_case |
| 125 |
dotnet_naming_style.static_field_style.required_prefix = s_ |
| 126 |
|
| 127 |
# Instance fields are camelCase and start with _ |
| 128 |
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion |
| 129 |
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields |
| 130 |
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style |
| 131 |
dotnet_naming_symbols.instance_fields.applicable_kinds = field |
| 132 |
dotnet_naming_style.instance_field_style.capitalization = camel_case |
| 133 |
dotnet_naming_style.instance_field_style.required_prefix = _ |
| 134 |
|
| 135 |
# Locals and parameters are camelCase |
| 136 |
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion |
| 137 |
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters |
| 138 |
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style |
| 139 |
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local |
| 140 |
dotnet_naming_style.camel_case_style.capitalization = camel_case |
| 141 |
|
| 142 |
# Local functions are PascalCase |
| 143 |
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion |
| 144 |
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions |
| 145 |
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style |
| 146 |
dotnet_naming_symbols.local_functions.applicable_kinds = local_function |
| 147 |
dotnet_naming_style.local_function_style.capitalization = pascal_case |
| 148 |
|
| 149 |
# By default, name items with PascalCase |
| 150 |
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion |
| 151 |
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members |
| 152 |
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style |
| 153 |
dotnet_naming_symbols.all_members.applicable_kinds = * |
| 154 |
dotnet_naming_style.pascal_case_style.capitalization = pascal_case |
| 155 |
|
| 156 |
# Code style defaults |
| 157 |
csharp_using_directive_placement = outside_namespace:suggestion |
| 158 |
dotnet_sort_system_directives_first = true |
| 159 |
csharp_prefer_braces = true:silent |
| 160 |
csharp_preserve_single_line_blocks = true:none |
| 161 |
csharp_preserve_single_line_statements = false:none |
| 162 |
csharp_prefer_static_local_function = true:suggestion |
| 163 |
csharp_prefer_simple_using_statement = false:none |
| 164 |
csharp_style_prefer_switch_expression = false:none |
| 165 |
dotnet_style_readonly_field = true:suggestion |
| 166 |
|
| 167 |
# Expression-level preferences |
| 168 |
dotnet_style_object_initializer = true:suggestion |
| 169 |
dotnet_style_collection_initializer = true:suggestion |
| 170 |
dotnet_style_explicit_tuple_names = true:suggestion |
| 171 |
dotnet_style_coalesce_expression = true:suggestion |
| 172 |
dotnet_style_null_propagation = true:suggestion |
| 173 |
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
| 174 |
dotnet_style_prefer_inferred_tuple_names = true:suggestion |
| 175 |
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 176 |
dotnet_style_prefer_auto_properties = true:suggestion |
| 177 |
dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
| 178 |
dotnet_style_prefer_conditional_expression_over_return = true:silent |
| 179 |
csharp_prefer_simple_default_expression = true:suggestion |
| 180 |
|
| 181 |
# Expression-bodied members |
| 182 |
csharp_style_expression_bodied_methods = true:silent |
| 183 |
csharp_style_expression_bodied_constructors = true:silent |
| 184 |
csharp_style_expression_bodied_operators = true:silent |
| 185 |
csharp_style_expression_bodied_properties = true:silent |
| 186 |
csharp_style_expression_bodied_indexers = true:silent |
| 187 |
csharp_style_expression_bodied_accessors = true:silent |
| 188 |
csharp_style_expression_bodied_lambdas = true:silent |
| 189 |
csharp_style_expression_bodied_local_functions = true:silent |
| 190 |
|
| 191 |
# Pattern matching |
| 192 |
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 193 |
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 194 |
csharp_style_inlined_variable_declaration = true:suggestion |
| 195 |
|
| 196 |
# Null checking preferences |
| 197 |
csharp_style_throw_expression = true:suggestion |
| 198 |
csharp_style_conditional_delegate_call = true:suggestion |
| 199 |
|
| 200 |
# Other features |
| 201 |
csharp_style_prefer_index_operator = false:none |
| 202 |
csharp_style_prefer_range_operator = false:none |
| 203 |
csharp_style_pattern_local_over_anonymous_function = false:none |
| 204 |
|
| 205 |
# Space preferences |
| 206 |
csharp_space_after_cast = false |
| 207 |
csharp_space_after_colon_in_inheritance_clause = true |
| 208 |
csharp_space_after_comma = true |
| 209 |
csharp_space_after_dot = false |
| 210 |
csharp_space_after_keywords_in_control_flow_statements = true |
| 211 |
csharp_space_after_semicolon_in_for_statement = true |
| 212 |
csharp_space_around_binary_operators = before_and_after |
| 213 |
csharp_space_around_declaration_statements = false |
| 214 |
csharp_space_before_colon_in_inheritance_clause = true |
| 215 |
csharp_space_before_comma = false |
| 216 |
csharp_space_before_dot = false |
| 217 |
csharp_space_before_open_square_brackets = false |
| 218 |
csharp_space_before_semicolon_in_for_statement = false |
| 219 |
csharp_space_between_empty_square_brackets = false |
| 220 |
csharp_space_between_method_call_empty_parameter_list_parentheses = false |
| 221 |
csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 222 |
csharp_space_between_method_call_parameter_list_parentheses = false |
| 223 |
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 224 |
csharp_space_between_method_declaration_name_and_open_parenthesis = false |
| 225 |
csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 226 |
csharp_space_between_parentheses = false |
| 227 |
csharp_space_between_square_brackets = false |