Commit Graph

2 Commits

Author SHA1 Message Date
github-actions[bot]
84425718aa eng: enhance .editorconfig with modern C# idiom preferences
Add missing code style rules that codify the idioms already used in the
codebase, making IDE suggestions consistent for all contributors:

- csharp_style_prefer_range_operator / prefer_index_operator: prefer
  range indexers ([..n], [n..], [^1]) over Substring / Length-based
  arithmetic (directly reinforces the refactoring in GatewayUrlHelper)
- csharp_style_prefer_switch_expression: prefer switch expressions
  over if/else chains (already used throughout Models.cs etc.)
- csharp_style_prefer_pattern_matching / prefer_not_pattern
- csharp_prefer_simple_using_statement: prefer declaration-style
  'using var x = ...' without a nested block
- dotnet_style_prefer_simplified_boolean_expressions
- dotnet_style_prefer_inferred_tuple_names /
  prefer_inferred_anonymous_type_member_names

No functional changes. 521 shared + 99 tray tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-01 13:02:38 +00:00
github-actions[bot]
52597f8dca
eng: add .editorconfig for consistent C# style
Adds .editorconfig with Allman braces, underscore camelCase fields, file-scoped namespaces.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-31 23:38:56 -07:00