From d83cab1c3e4cba138eed475bdeb7d8f3859c7a89 Mon Sep 17 00:00:00 2001 From: nsnail Date: Thu, 25 Apr 2024 22:02:56 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20editorConfig=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=BC=96=E7=A0=81=20(#106)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [skip ci] --- .editorconfig | 94 +++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5d072eb1..122c3ea3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,58 +1,58 @@ -# 此文件为 EditorConfig 配置文件,用于设置跨编辑器的代码格式化规则。 -# root = true 表示此文件是根配置文件。 +# 姝ゆ枃浠朵负 EditorConfig 閰嶇疆鏂囦欢锛岀敤浜庤缃法缂栬緫鍣ㄧ殑浠g爜鏍煎紡鍖栬鍒欍 +# root = true 琛ㄧず姝ゆ枃浠舵槸鏍归厤缃枃浠躲 root = true [*] -charset = utf-8 # 文件字符集为 UTF-8 -end_of_line = lf # 行结束符为 LF -ij_xml_attribute_wrap = off # IntelliJ IDEA 中 XML 属性不换行 -ij_xml_text_wrap = off # IntelliJ IDEA 中 XML 文本不换行 -indent_size = 4 # 缩进大小为 4 个空格 -indent_style = space # 使用空格进行缩进 -insert_final_newline = false # 不在文件末尾插入空行 -trim_trailing_whitespace = true # 删除行尾的空格 +charset = utf-8 # 鏂囦欢瀛楃闆嗕负 UTF-8 +end_of_line = lf # 琛岀粨鏉熺涓 LF +ij_xml_attribute_wrap = off # IntelliJ IDEA 涓 XML 灞炴т笉鎹㈣ +ij_xml_text_wrap = off # IntelliJ IDEA 涓 XML 鏂囨湰涓嶆崲琛 +indent_size = 4 # 缂╄繘澶у皬涓 4 涓┖鏍 +indent_style = space # 浣跨敤绌烘牸杩涜缂╄繘 +insert_final_newline = false # 涓嶅湪鏂囦欢鏈熬鎻掑叆绌鸿 +trim_trailing_whitespace = true # 鍒犻櫎琛屽熬鐨勭┖鏍 [{*.json,*.yml}] -indent_size = 2 # 对于 JSON 和 YAML 文件,缩进大小为 2 个空格 +indent_size = 2 # 瀵逛簬 JSON 鍜 YAML 鏂囦欢锛岀缉杩涘ぇ灏忎负 2 涓┖鏍 [*.cs] -dotnet_analyzer_diagnostic.severity = warning # 设置 C# 文件中所有 dotnet_analyzer_diagnostic 的严重性级别为 warning +dotnet_analyzer_diagnostic.severity = warning # 璁剧疆 C# 鏂囦欢涓墍鏈 dotnet_analyzer_diagnostic 鐨勪弗閲嶆х骇鍒负 warning # ReSharper properties -resharper_align_linq_query = true # 启用对LINQ查询的对齐 -resharper_align_multiline_argument = true # 启用多行参数的对齐 -resharper_align_multiline_array_and_object_initializer = true # 启用多行数组和对象初始化器的对齐 -resharper_align_multiline_binary_patterns = true # 启用多行二元模式的对齐 -resharper_align_multiline_calls_chain = true # 启用多行调用链的对齐 -resharper_align_multiline_extends_list = true # 启用多行扩展列表的对齐 -resharper_align_multiline_parameter = true # 启用多行参数的对齐 -resharper_align_multiline_property_pattern = true # 启用多行属性模式的对齐 -resharper_align_multiline_switch_expression = true # 启用多行切换表达式的对齐 -resharper_align_multiple_declaration = true # 启用多个声明的对齐 -resharper_align_multline_type_parameter_constrains = true # 启用多行类型参数约束的对齐 -resharper_align_multline_type_parameter_list = true # 启用多行类型参数列表的对齐 -resharper_align_tuple_components = true # 启用元组组件的对齐 -resharper_allow_comment_after_lbrace = true # 允许在大括号前添加注释 -resharper_blank_lines_before_single_line_comment = 1 # 在单行注释前添加空行 -resharper_csharp_empty_block_style = together_same_line # 设置空块的样式为“在一起,在同一行” -resharper_csharp_outdent_commas = true # 是否将逗号后的代码退缩 -resharper_csharp_place_type_constraints_on_same_line = false # 在类型约束上是否保持在同一行 -resharper_csharp_stick_comment = false # 是否将注释粘贴在代码行的末尾 -resharper_csharp_wrap_before_comma = true # 在逗号前是否添加换行 -resharper_indent_nested_for_stmt = true # 是否对嵌套的for语句进行缩进 -resharper_indent_nested_foreach_stmt = true # 是否对嵌套的foreach语句进行缩进 -resharper_indent_nested_while_stmt = true # 是否对嵌套的while语句进行缩进 -resharper_indent_preprocessor_if = usual_indent # 设置预处理器指令`if`的缩进方式 -resharper_indent_preprocessor_other = usual_indent # 设置其他预处理器指令的缩进方式 -resharper_int_align = true # 启用整数对齐 -resharper_keep_existing_arrangement = false # 在重新排列时是否保留现有的布局 -resharper_place_linq_into_on_new_line = false # 是否将LINQ表达式放在新行 -resharper_place_simple_embedded_statement_on_same_line = false # 是否将简单的嵌入式语句放在同一行 -resharper_place_simple_switch_expression_on_single_line = true # 是否将简单的切换表达式放在单行 -resharper_wrap_before_eq = true # 在等号前是否添加换行 -resharper_wrap_chained_method_calls = chop_if_long # 是否拆分链式方法调用 -resharper_wrap_switch_expression = chop_if_long # 是否拆分切换表达式 +resharper_align_linq_query = true # 鍚敤瀵筁INQ鏌ヨ鐨勫榻 +resharper_align_multiline_argument = true # 鍚敤澶氳鍙傛暟鐨勫榻 +resharper_align_multiline_array_and_object_initializer = true # 鍚敤澶氳鏁扮粍鍜屽璞″垵濮嬪寲鍣ㄧ殑瀵归綈 +resharper_align_multiline_binary_patterns = true # 鍚敤澶氳浜屽厓妯″紡鐨勫榻 +resharper_align_multiline_calls_chain = true # 鍚敤澶氳璋冪敤閾剧殑瀵归綈 +resharper_align_multiline_extends_list = true # 鍚敤澶氳鎵╁睍鍒楄〃鐨勫榻 +resharper_align_multiline_parameter = true # 鍚敤澶氳鍙傛暟鐨勫榻 +resharper_align_multiline_property_pattern = true # 鍚敤澶氳灞炴фā寮忕殑瀵归綈 +resharper_align_multiline_switch_expression = true # 鍚敤澶氳鍒囨崲琛ㄨ揪寮忕殑瀵归綈 +resharper_align_multiple_declaration = true # 鍚敤澶氫釜澹版槑鐨勫榻 +resharper_align_multline_type_parameter_constrains = true # 鍚敤澶氳绫诲瀷鍙傛暟绾︽潫鐨勫榻 +resharper_align_multline_type_parameter_list = true # 鍚敤澶氳绫诲瀷鍙傛暟鍒楄〃鐨勫榻 +resharper_align_tuple_components = true # 鍚敤鍏冪粍缁勪欢鐨勫榻 +resharper_allow_comment_after_lbrace = true # 鍏佽鍦ㄥぇ鎷彿鍓嶆坊鍔犳敞閲 +resharper_blank_lines_before_single_line_comment = 1 # 鍦ㄥ崟琛屾敞閲婂墠娣诲姞绌鸿 +resharper_csharp_empty_block_style = together_same_line # 璁剧疆绌哄潡鐨勬牱寮忎负鈥滃湪涓璧凤紝鍦ㄥ悓涓琛屸 +resharper_csharp_outdent_commas = true # 鏄惁灏嗛楀彿鍚庣殑浠g爜閫缂 +resharper_csharp_place_type_constraints_on_same_line = false # 鍦ㄧ被鍨嬬害鏉熶笂鏄惁淇濇寔鍦ㄥ悓涓琛 +resharper_csharp_stick_comment = false # 鏄惁灏嗘敞閲婄矘璐村湪浠g爜琛岀殑鏈熬 +resharper_csharp_wrap_before_comma = true # 鍦ㄩ楀彿鍓嶆槸鍚︽坊鍔犳崲琛 +resharper_indent_nested_for_stmt = true # 鏄惁瀵瑰祵濂楃殑for璇彞杩涜缂╄繘 +resharper_indent_nested_foreach_stmt = true # 鏄惁瀵瑰祵濂楃殑foreach璇彞杩涜缂╄繘 +resharper_indent_nested_while_stmt = true # 鏄惁瀵瑰祵濂楃殑while璇彞杩涜缂╄繘 +resharper_indent_preprocessor_if = usual_indent # 璁剧疆棰勫鐞嗗櫒鎸囦护`if`鐨勭缉杩涙柟寮 +resharper_indent_preprocessor_other = usual_indent # 璁剧疆鍏朵粬棰勫鐞嗗櫒鎸囦护鐨勭缉杩涙柟寮 +resharper_int_align = true # 鍚敤鏁存暟瀵归綈 +resharper_keep_existing_arrangement = false # 鍦ㄩ噸鏂版帓鍒楁椂鏄惁淇濈暀鐜版湁鐨勫竷灞 +resharper_place_linq_into_on_new_line = false # 鏄惁灏哃INQ琛ㄨ揪寮忔斁鍦ㄦ柊琛 +resharper_place_simple_embedded_statement_on_same_line = false # 鏄惁灏嗙畝鍗曠殑宓屽叆寮忚鍙ユ斁鍦ㄥ悓涓琛 +resharper_place_simple_switch_expression_on_single_line = true # 鏄惁灏嗙畝鍗曠殑鍒囨崲琛ㄨ揪寮忔斁鍦ㄥ崟琛 +resharper_wrap_before_eq = true # 鍦ㄧ瓑鍙峰墠鏄惁娣诲姞鎹㈣ +resharper_wrap_chained_method_calls = chop_if_long # 鏄惁鎷嗗垎閾惧紡鏂规硶璋冪敤 +resharper_wrap_switch_expression = chop_if_long # 鏄惁鎷嗗垎鍒囨崲琛ㄨ揪寮 # Microsoft .NET properties -csharp_indent_braces = false # 设置为false表示花括号不跟随代码行缩进 -csharp_new_line_before_open_brace = local_functions, methods, types # 这里设置为local_functions, methods, types,表示在局部函数、方法和类型定义的开放花括号前应换行 \ No newline at end of file +csharp_indent_braces = false # 璁剧疆涓篺alse琛ㄧず鑺辨嫭鍙蜂笉璺熼殢浠g爜琛岀缉杩 +csharp_new_line_before_open_brace = local_functions, methods, types # 杩欓噷璁剧疆涓簂ocal_functions, methods, types锛岃〃绀哄湪灞閮ㄥ嚱鏁般佹柟娉曞拰绫诲瀷瀹氫箟鐨勫紑鏀捐姳鎷彿鍓嶅簲鎹㈣ \ No newline at end of file