Add .editorconfig and normalize whitespace/style in ModeratorFrontEnd - #607
Conversation
dthaler
left a comment
There was a problem hiding this comment.
Thanks for this contribution!
A couple of (non-blocking) spacing nits remain, see suggestions.
kauereinbold
left a comment
There was a problem hiding this comment.
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.
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.
29aacf2 to
1279fe2
Compare
|
@kauereinbold Addressed the 19 .razor tab-indents in this PR. Please take a look at it. |
|
@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? |
Closes #602
Adds a root
.editorconfigand applies it viadotnet formatacrossModeratorFrontEnd/AIForOrcasandModeratorFrontEnd/OrcaHello:indent_style = space,indent_size = 4- 4-space indentationcsharp_new_line_before_open_brace = all- Allman-style bracescsharp_space_after_keywords_in_control_flow_statements = truedotnet_style_predefined_type_for_locals_parameters_members = true : warning(IDE0049).razormarkup files thatdotnet formatdoesn't process(tabs → 4-space indentation).
Verified with
git diff -w --stat(only 6 files have non-whitespace changes, allreviewed) and both solutions build clean.
Left
String.IsNullOrWhiteSpace/String.Joincall 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.