Skip to content

Add .editorconfig and normalize whitespace/style in ModeratorFrontEnd - #607

Merged
dthaler merged 4 commits into
orcasound:mainfrom
shashankshirur:fix-editorconfig-tabs
Aug 18, 2026
Merged

Add .editorconfig and normalize whitespace/style in ModeratorFrontEnd#607
dthaler merged 4 commits into
orcasound:mainfrom
shashankshirur:fix-editorconfig-tabs

Conversation

@shashankshirur

@shashankshirur shashankshirur commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Closes #602

Adds a root .editorconfig and applies it via dotnet format across ModeratorFrontEnd/AIForOrcas and ModeratorFrontEnd/OrcaHello:

  • indent_style = space, indent_size = 4 - 4-space indentation
  • csharp_new_line_before_open_brace = all - Allman-style braces
  • csharp_space_after_keywords_in_control_flow_statements = true
  • dotnet_style_predefined_type_for_locals_parameters_members = true : warning (IDE0049)
  • Also converts the 19 .razor markup files that dotnet format doesn't process
    (tabs → 4-space indentation).

Verified with git diff -w --stat (only 6 files have non-whitespace changes, all
reviewed) and both solutions build clean.

Left String.IsNullOrWhiteSpace/String.Join call sites unconverted -
governed by a sibling rule (dotnet_style_predefined_type_for_member_access) not named in the issue, can add if wanted.

#603 left for a follow-up PR on this same .editorconfig.

@dthaler dthaler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution!
A couple of (non-blocking) spacing nits remain, see suggestions.

@kauereinbold kauereinbold left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this out and ran it through the proofs the issue asked for. Both solutions build with no errors, and git diff -w confirms the non-whitespace changes are only the six files listed in the description plus the new .editorconfig: brace moves, the Object to object rename, and the stray semicolon Dave already flagged. Nothing that changes behavior. dotnet format whitespace --verify-no-changes and dotnet format style --verify-no-changes --severity warn both come back clean, and the IDE0049 rule does fire: I put an Object back in ValidatorUtilities and the formatter caught it at the right line, so the unusual spacing in the severity syntax isn't a problem.

One gap worth naming: #602 counted 72 tab-indented files across .cs and .razor. This branch still has 19 of them, all .razor, because dotnet format doesn't process Razor markup. The .editorconfig steers editors on future razor edits, but the existing files keep their tabs. I'd either convert those 19 in this pass or say in the description that razor is left out, so #602 doesn't close with a quarter of the files it counted still tabbed.

Thanks for picking this up.

@kauereinbold kauereinbold moved this to waiting in OrcaHello Aug 18, 2026
@kauereinbold kauereinbold moved this to waiting in OrcaHello Aug 18, 2026
@kauereinbold kauereinbold moved this to waiting in OrcaHello Aug 18, 2026
Encodes the 4 space indentation and C# style guide rules from orcasound#602
(Allman braces, space after control flow keywords, predefined type keywords) and applies them via `dotnet format` across AIForOrcas and OrcaHello
Converts leading tabs to 4-space indentation in the 19 .razor markup
files dotnet format doesn't process.
@shashankshirur

Copy link
Copy Markdown
Contributor Author

@kauereinbold Addressed the 19 .razor tab-indents in this PR. Please take a look at it.

@shashankshirur
shashankshirur marked this pull request as ready for review August 18, 2026 06:20
@shashankshirur

Copy link
Copy Markdown
Contributor Author

@dthaler All your suggestions and the .razor tabs gap are addressed now. Would you prefer to resolve the conversations yourself, or is it okay if I do?

@dthaler
dthaler merged commit 1d1bf92 into orcasound:main Aug 18, 2026
21 checks passed
@kauereinbold kauereinbold moved this from waiting to done in OrcaHello Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: done

Development

Successfully merging this pull request may close these issues.

Tab indentation in ModeratorFrontEnd goes against the C# style guide

3 participants