|
| 1 | +# 上位ディレクトリから .editorconfig 設定を継承する場合は、以下の行を削除します |
| 2 | +root = true |
| 3 | + |
| 4 | +# C# ファイル |
| 5 | +[*.cs] |
| 6 | + |
| 7 | +#### コア EditorConfig オプション #### |
| 8 | + |
| 9 | +# インデントと間隔 |
| 10 | +indent_size = 4 |
| 11 | +indent_style = space |
| 12 | +tab_width = 4 |
| 13 | + |
| 14 | +# 改行設定 |
| 15 | +end_of_line = lf |
| 16 | +charset = utf-8-bom |
| 17 | +insert_final_newline = true |
| 18 | + |
| 19 | +#### .NET コーディング規則 #### |
| 20 | + |
| 21 | +# using の整理 |
| 22 | +dotnet_separate_import_directive_groups = false |
| 23 | +dotnet_sort_system_directives_first = true |
| 24 | +file_header_template = unset |
| 25 | + |
| 26 | +# this. と Me. の設定 |
| 27 | +dotnet_style_qualification_for_event = false:silent |
| 28 | +dotnet_style_qualification_for_field = false:silent |
| 29 | +dotnet_style_qualification_for_method = false:silent |
| 30 | +dotnet_style_qualification_for_property = false:silent |
| 31 | + |
| 32 | +# 言語キーワードと BCL の種類の設定 |
| 33 | +dotnet_style_predefined_type_for_locals_parameters_members = true:silent |
| 34 | +dotnet_style_predefined_type_for_member_access = true:silent |
| 35 | + |
| 36 | +# かっこの設定 |
| 37 | +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent |
| 38 | +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent |
| 39 | +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent |
| 40 | +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent |
| 41 | + |
| 42 | +# 修飾子設定 |
| 43 | +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent |
| 44 | + |
| 45 | +# 式レベルの設定 |
| 46 | +dotnet_style_coalesce_expression = true:suggestion |
| 47 | +dotnet_style_collection_initializer = true:suggestion |
| 48 | +dotnet_style_explicit_tuple_names = true:suggestion |
| 49 | +dotnet_style_null_propagation = true:suggestion |
| 50 | +dotnet_style_object_initializer = true:suggestion |
| 51 | +dotnet_style_operator_placement_when_wrapping = beginning_of_line |
| 52 | +dotnet_style_prefer_auto_properties = true:silent |
| 53 | +dotnet_style_prefer_compound_assignment = true:suggestion |
| 54 | +dotnet_style_prefer_conditional_expression_over_assignment = true:silent |
| 55 | +dotnet_style_prefer_conditional_expression_over_return = true:silent |
| 56 | +dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion |
| 57 | +dotnet_style_prefer_inferred_tuple_names = true:suggestion |
| 58 | +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion |
| 59 | +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion |
| 60 | +dotnet_style_prefer_simplified_interpolation = true:suggestion |
| 61 | + |
| 62 | +# フィールド設定 |
| 63 | +dotnet_style_readonly_field = true:suggestion |
| 64 | + |
| 65 | +# パラメーターの設定 |
| 66 | +dotnet_code_quality_unused_parameters = all:suggestion |
| 67 | + |
| 68 | +#### C# コーディング規則 #### |
| 69 | + |
| 70 | +# var を優先 |
| 71 | +csharp_style_var_elsewhere = false:silent |
| 72 | +csharp_style_var_for_built_in_types = false:silent |
| 73 | +csharp_style_var_when_type_is_apparent = false:silent |
| 74 | + |
| 75 | +# 式のようなメンバー |
| 76 | +csharp_style_expression_bodied_accessors = true:silent |
| 77 | +csharp_style_expression_bodied_constructors = false:silent |
| 78 | +csharp_style_expression_bodied_indexers = true:silent |
| 79 | +csharp_style_expression_bodied_lambdas = true:silent |
| 80 | +csharp_style_expression_bodied_local_functions = false:silent |
| 81 | +csharp_style_expression_bodied_methods = false:silent |
| 82 | +csharp_style_expression_bodied_operators = false:silent |
| 83 | +csharp_style_expression_bodied_properties = true:silent |
| 84 | + |
| 85 | +# パターン マッチング設定 |
| 86 | +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion |
| 87 | +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion |
| 88 | +csharp_style_prefer_switch_expression = true:suggestion |
| 89 | + |
| 90 | +# Null チェック設定 |
| 91 | +csharp_style_conditional_delegate_call = true:suggestion |
| 92 | + |
| 93 | +# 修飾子設定 |
| 94 | +csharp_prefer_static_local_function = true:suggestion |
| 95 | +csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent |
| 96 | + |
| 97 | +# コード ブロックの設定 |
| 98 | +csharp_prefer_braces = true:warning |
| 99 | +csharp_prefer_simple_using_statement = true:suggestion |
| 100 | + |
| 101 | +# 式レベルの設定 |
| 102 | +csharp_prefer_simple_default_expression = true:suggestion |
| 103 | +csharp_style_deconstructed_variable_declaration = true:suggestion |
| 104 | +csharp_style_inlined_variable_declaration = true:suggestion |
| 105 | +csharp_style_pattern_local_over_anonymous_function = true:suggestion |
| 106 | +csharp_style_prefer_index_operator = true:suggestion |
| 107 | +csharp_style_prefer_range_operator = true:suggestion |
| 108 | +csharp_style_throw_expression = true:suggestion |
| 109 | +csharp_style_unused_value_assignment_preference = discard_variable:suggestion |
| 110 | +csharp_style_unused_value_expression_statement_preference = discard_variable:silent |
| 111 | + |
| 112 | +# 'using' ディレクティブの基本設定 |
| 113 | +csharp_using_directive_placement = outside_namespace:silent |
| 114 | + |
| 115 | +#### C# 書式ルール #### |
| 116 | + |
| 117 | +# 改行設定 |
| 118 | +csharp_new_line_before_catch = true |
| 119 | +csharp_new_line_before_else = true |
| 120 | +csharp_new_line_before_finally = true |
| 121 | +csharp_new_line_before_members_in_anonymous_types = true |
| 122 | +csharp_new_line_before_members_in_object_initializers = true |
| 123 | +csharp_new_line_before_open_brace = all |
| 124 | +csharp_new_line_between_query_expression_clauses = true |
| 125 | + |
| 126 | +# インデント設定 |
| 127 | +csharp_indent_block_contents = true |
| 128 | +csharp_indent_braces = false |
| 129 | +csharp_indent_case_contents = true |
| 130 | +csharp_indent_case_contents_when_block = true |
| 131 | +csharp_indent_labels = one_less_than_current |
| 132 | +csharp_indent_switch_labels = true |
| 133 | + |
| 134 | +# スペース設定 |
| 135 | +csharp_space_after_cast = false |
| 136 | +csharp_space_after_colon_in_inheritance_clause = true |
| 137 | +csharp_space_after_comma = true |
| 138 | +csharp_space_after_dot = false |
| 139 | +csharp_space_after_keywords_in_control_flow_statements = true |
| 140 | +csharp_space_after_semicolon_in_for_statement = true |
| 141 | +csharp_space_around_binary_operators = before_and_after |
| 142 | +csharp_space_around_declaration_statements = false |
| 143 | +csharp_space_before_colon_in_inheritance_clause = true |
| 144 | +csharp_space_before_comma = false |
| 145 | +csharp_space_before_dot = false |
| 146 | +csharp_space_before_open_square_brackets = false |
| 147 | +csharp_space_before_semicolon_in_for_statement = false |
| 148 | +csharp_space_between_empty_square_brackets = false |
| 149 | +csharp_space_between_method_call_empty_parameter_list_parentheses = false |
| 150 | +csharp_space_between_method_call_name_and_opening_parenthesis = false |
| 151 | +csharp_space_between_method_call_parameter_list_parentheses = false |
| 152 | +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false |
| 153 | +csharp_space_between_method_declaration_name_and_open_parenthesis = false |
| 154 | +csharp_space_between_method_declaration_parameter_list_parentheses = false |
| 155 | +csharp_space_between_parentheses = false |
| 156 | +csharp_space_between_square_brackets = false |
| 157 | + |
| 158 | +# 折り返しの設定 |
| 159 | +csharp_preserve_single_line_blocks = true |
| 160 | +csharp_preserve_single_line_statements = true |
| 161 | + |
| 162 | +#### 命名スタイル #### |
| 163 | + |
| 164 | +# 名前付けルール |
| 165 | + |
| 166 | +dotnet_naming_rule.interface_should_be_i_で始まる.severity = warning |
| 167 | +dotnet_naming_rule.interface_should_be_i_で始まる.symbols = interface |
| 168 | +dotnet_naming_rule.interface_should_be_i_で始まる.style = i_で始まる |
| 169 | + |
| 170 | +dotnet_naming_rule.型_should_be_パスカル_ケース.severity = suggestion |
| 171 | +dotnet_naming_rule.型_should_be_パスカル_ケース.symbols = 型 |
| 172 | +dotnet_naming_rule.型_should_be_パスカル_ケース.style = パスカル_ケース |
| 173 | + |
| 174 | +dotnet_naming_rule.class_should_be_パスカル_ケース.severity = warning |
| 175 | +dotnet_naming_rule.class_should_be_パスカル_ケース.symbols = class |
| 176 | +dotnet_naming_rule.class_should_be_パスカル_ケース.style = パスカル_ケース |
| 177 | + |
| 178 | +dotnet_naming_rule.メソッド_should_be_パスカル_ケース.severity = warning |
| 179 | +dotnet_naming_rule.メソッド_should_be_パスカル_ケース.symbols = メソッド |
| 180 | +dotnet_naming_rule.メソッド_should_be_パスカル_ケース.style = パスカル_ケース |
| 181 | + |
| 182 | +dotnet_naming_rule.プライベート_メソッド_should_be_パスカル_ケース.severity = warning |
| 183 | +dotnet_naming_rule.プライベート_メソッド_should_be_パスカル_ケース.symbols = プライベート_メソッド |
| 184 | +dotnet_naming_rule.プライベート_メソッド_should_be_パスカル_ケース.style = パスカル_ケース |
| 185 | + |
| 186 | +dotnet_naming_rule.抽象メソッド_should_be_パスカル_ケース.severity = warning |
| 187 | +dotnet_naming_rule.抽象メソッド_should_be_パスカル_ケース.symbols = 抽象メソッド |
| 188 | +dotnet_naming_rule.抽象メソッド_should_be_パスカル_ケース.style = パスカル_ケース |
| 189 | + |
| 190 | +dotnet_naming_rule.静的メソッド_should_be_パスカル_ケース.severity = warning |
| 191 | +dotnet_naming_rule.静的メソッド_should_be_パスカル_ケース.symbols = 静的メソッド |
| 192 | +dotnet_naming_rule.静的メソッド_should_be_パスカル_ケース.style = パスカル_ケース |
| 193 | + |
| 194 | +dotnet_naming_rule.プライベートまたは内部フィールド_should_be_キャメルケース.severity = warning |
| 195 | +dotnet_naming_rule.プライベートまたは内部フィールド_should_be_キャメルケース.symbols = プライベートまたは内部フィールド |
| 196 | +dotnet_naming_rule.プライベートまたは内部フィールド_should_be_キャメルケース.style = キャメルケース |
| 197 | + |
| 198 | +dotnet_naming_rule.property_should_be_パスカル_ケース.severity = warning |
| 199 | +dotnet_naming_rule.property_should_be_パスカル_ケース.symbols = property |
| 200 | +dotnet_naming_rule.property_should_be_パスカル_ケース.style = パスカル_ケース |
| 201 | + |
| 202 | +dotnet_naming_rule.event_should_be_パスカル_ケース.severity = warning |
| 203 | +dotnet_naming_rule.event_should_be_パスカル_ケース.symbols = event |
| 204 | +dotnet_naming_rule.event_should_be_パスカル_ケース.style = パスカル_ケース |
| 205 | + |
| 206 | +dotnet_naming_rule.パラメータ_ローカル変数_should_be_キャメルケース.severity = warning |
| 207 | +dotnet_naming_rule.パラメータ_ローカル変数_should_be_キャメルケース.symbols = パラメータ_ローカル変数 |
| 208 | +dotnet_naming_rule.パラメータ_ローカル変数_should_be_キャメルケース.style = キャメルケース |
| 209 | + |
| 210 | +# 記号の仕様 |
| 211 | + |
| 212 | +dotnet_naming_symbols.class.applicable_kinds = class |
| 213 | +dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 214 | +dotnet_naming_symbols.class.required_modifiers = |
| 215 | + |
| 216 | +dotnet_naming_symbols.interface.applicable_kinds = interface |
| 217 | +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 218 | +dotnet_naming_symbols.interface.required_modifiers = |
| 219 | + |
| 220 | +dotnet_naming_symbols.event.applicable_kinds = event |
| 221 | +dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 222 | +dotnet_naming_symbols.event.required_modifiers = |
| 223 | + |
| 224 | +dotnet_naming_symbols.メソッド.applicable_kinds = method |
| 225 | +dotnet_naming_symbols.メソッド.applicable_accessibilities = public |
| 226 | +dotnet_naming_symbols.メソッド.required_modifiers = |
| 227 | + |
| 228 | +dotnet_naming_symbols.プライベート_メソッド.applicable_kinds = method |
| 229 | +dotnet_naming_symbols.プライベート_メソッド.applicable_accessibilities = private |
| 230 | +dotnet_naming_symbols.プライベート_メソッド.required_modifiers = |
| 231 | + |
| 232 | +dotnet_naming_symbols.抽象メソッド.applicable_kinds = method |
| 233 | +dotnet_naming_symbols.抽象メソッド.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 234 | +dotnet_naming_symbols.抽象メソッド.required_modifiers = abstract |
| 235 | + |
| 236 | +dotnet_naming_symbols.静的メソッド.applicable_kinds = method |
| 237 | +dotnet_naming_symbols.静的メソッド.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 238 | +dotnet_naming_symbols.静的メソッド.required_modifiers = static |
| 239 | + |
| 240 | +dotnet_naming_symbols.property.applicable_kinds = property |
| 241 | +dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 242 | +dotnet_naming_symbols.property.required_modifiers = |
| 243 | + |
| 244 | +dotnet_naming_symbols.プライベートまたは内部フィールド.applicable_kinds = field |
| 245 | +dotnet_naming_symbols.プライベートまたは内部フィールド.applicable_accessibilities = internal, private, private_protected |
| 246 | +dotnet_naming_symbols.プライベートまたは内部フィールド.required_modifiers = |
| 247 | + |
| 248 | +dotnet_naming_symbols.型.applicable_kinds = class, struct, interface, enum |
| 249 | +dotnet_naming_symbols.型.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected |
| 250 | +dotnet_naming_symbols.型.required_modifiers = |
| 251 | + |
| 252 | +dotnet_naming_symbols.パラメータ_ローカル変数.applicable_kinds = parameter, local |
| 253 | +dotnet_naming_symbols.パラメータ_ローカル変数.applicable_accessibilities = * |
| 254 | +dotnet_naming_symbols.パラメータ_ローカル変数.required_modifiers = |
| 255 | + |
| 256 | +# 命名スタイル |
| 257 | + |
| 258 | +dotnet_naming_style.パスカル_ケース.required_prefix = |
| 259 | +dotnet_naming_style.パスカル_ケース.required_suffix = |
| 260 | +dotnet_naming_style.パスカル_ケース.word_separator = |
| 261 | +dotnet_naming_style.パスカル_ケース.capitalization = pascal_case |
| 262 | + |
| 263 | +dotnet_naming_style.i_で始まる.required_prefix = I |
| 264 | +dotnet_naming_style.i_で始まる.required_suffix = |
| 265 | +dotnet_naming_style.i_で始まる.word_separator = |
| 266 | +dotnet_naming_style.i_で始まる.capitalization = pascal_case |
| 267 | + |
| 268 | +dotnet_naming_style.キャメルケース.required_prefix = |
| 269 | +dotnet_naming_style.キャメルケース.required_suffix = |
| 270 | +dotnet_naming_style.キャメルケース.word_separator = |
| 271 | +dotnet_naming_style.キャメルケース.capitalization = camel_case |
0 commit comments