# VideoDownloader 코드 스타일 # 기존 코드베이스 실측 기준: 4스페이스 · file-scoped namespace · Allman 중괄호 · UTF-8 한글 주석 root = true [*] charset = utf-8 end_of_line = crlf indent_style = space indent_size = 4 insert_final_newline = true trim_trailing_whitespace = true [*.{yml,yaml,json,csproj,props,targets,xml,plist}] indent_size = 2 [*.md] # 마크다운은 줄 끝 공백 2칸이 강제 개행이라 자르지 않는다. trim_trailing_whitespace = false [*.sh] end_of_line = lf [*.cs] # ── using ── dotnet_sort_system_directives_first = true dotnet_separate_import_directive_groups = false csharp_using_directive_placement = outside_namespace:warning # ── 네임스페이스/중괄호 ── csharp_style_namespace_declarations = file_scoped:warning csharp_prefer_braces = when_multiline:silent csharp_new_line_before_open_brace = all csharp_new_line_before_else = true csharp_new_line_before_catch = true csharp_new_line_before_finally = true # ── 최신 C# 문법 (LangVersion latest 전제) ── csharp_style_var_for_built_in_types = false:silent csharp_style_var_when_type_is_apparent = true:suggestion csharp_style_expression_bodied_methods = when_on_single_line:silent csharp_style_expression_bodied_properties = true:suggestion csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion csharp_style_pattern_matching_over_as_with_null_check = true:suggestion csharp_style_prefer_switch_expression = true:suggestion csharp_style_throw_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion csharp_prefer_simple_using_statement = true:suggestion csharp_style_prefer_range_operator = true:suggestion csharp_style_prefer_index_operator = true:suggestion # ── this. 미사용 (기존 코드 관행) ── dotnet_style_qualification_for_field = false:suggestion dotnet_style_qualification_for_property = false:suggestion dotnet_style_qualification_for_method = false:suggestion dotnet_style_qualification_for_event = false:suggestion # ── 명명 규칙: private 필드 _camelCase ── dotnet_naming_rule.private_fields_underscore.severity = suggestion dotnet_naming_rule.private_fields_underscore.symbols = private_fields dotnet_naming_rule.private_fields_underscore.style = underscore_prefix dotnet_naming_symbols.private_fields.applicable_kinds = field dotnet_naming_symbols.private_fields.applicable_accessibilities = private dotnet_naming_style.underscore_prefix.required_prefix = _ dotnet_naming_style.underscore_prefix.capitalization = camel_case # ── 상수/공개 멤버 PascalCase ── dotnet_naming_rule.public_members_pascal.severity = suggestion dotnet_naming_rule.public_members_pascal.symbols = public_members dotnet_naming_rule.public_members_pascal.style = pascal_case dotnet_naming_symbols.public_members.applicable_kinds = property,method,event,class,struct,interface,enum dotnet_naming_symbols.public_members.applicable_accessibilities = public,internal,protected dotnet_naming_style.pascal_case.capitalization = pascal_case # ── 실수 방지: 경고로 올려두는 항목 ── # 사용하지 않는 지역 변수 / 도달 불가 코드 / 비동기 메서드 await 누락 dotnet_diagnostic.CS4014.severity = warning dotnet_diagnostic.CS1998.severity = suggestion dotnet_diagnostic.IDE0005.severity = suggestion [*.{xaml,axaml}] indent_size = 4 # XAML 은 IDE 포매터가 후행 공백을 남기는 경우가 잦아 강제하지 않는다. trim_trailing_whitespace = false