Skip to content

chore(format): apply CSharpier formatting to all source files#443

Merged
nanotaboada merged 4 commits intomasterfrom
chore/format-csharpier
Apr 4, 2026
Merged

chore(format): apply CSharpier formatting to all source files#443
nanotaboada merged 4 commits intomasterfrom
chore/format-csharpier

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Apr 2, 2026

Summary

  • Formats 3 files that were not compliant with CSharpier rules: two migration files and Utilities/PlayerData.cs
  • No logic changes — whitespace/brace style only
  • Eliminates unexpected formatting diffs in future iterations

Test plan

  • dotnet csharpier . --check reports no unformatted files
  • dotnet build --configuration Release succeeds
  • dotnet test --settings .runsettings passes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Internal code formatting optimization with no end-user impact.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 2, 2026

Walkthrough

A single-line reformatting of the JsonSerializerOptions static initializer in PlayerData.cs was performed, consolidating multi-line formatting while preserving the PropertyNameCaseInsensitive = true configuration and maintaining all existing functionality.

Changes

Cohort / File(s) Summary
Code Formatting
src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs
Condensed options static JsonSerializerOptions initializer from multi-line to single-line expression; no functional or logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with 'chore:' prefix, is 61 characters (under 80), and accurately describes the formatting changes made to the source files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/format-csharpier
  • 🛠️ sync documentation: Commit on current branch
  • 🛠️ sync documentation: Create PR
  • 🛠️ enforce http error handling: Commit on current branch
  • 🛠️ enforce http error handling: Create PR
  • 🛠️ idiomatic review: Commit on current branch
  • 🛠️ idiomatic review: Create PR
  • 🛠️ verify api contract: Commit on current branch
  • 🛠️ verify api contract: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs (1)

915-916: LGTM! Formatting change aligns with CSharpier standards.

The consolidation of the JsonSerializerOptions initializer is consistent with CSharpier formatting rules, and the logic remains unchanged.

Optional: Consider renaming for consistency with C# conventions.

The private field options could be renamed to _options to align with the coding guideline requiring _ prefix for private fields. However, this is pre-existing and outside the scope of this formatting-only PR.

Based on coding guidelines: "Use PascalCase for public members and camelCase for private fields with _ prefix in C#"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs` around lines
915 - 916, Rename the private JsonSerializerOptions field named options to
follow the project's private-field convention (prefix with an underscore), e.g.,
_options; update the declaration (private static readonly JsonSerializerOptions
options) and all usages of options throughout PlayerData (or any referencing
classes) to use _options, keeping the initializer (new() {
PropertyNameCaseInsensitive = true }) unchanged so behavior is preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs`:
- Around line 915-916: Rename the private JsonSerializerOptions field named
options to follow the project's private-field convention (prefix with an
underscore), e.g., _options; update the declaration (private static readonly
JsonSerializerOptions options) and all usages of options throughout PlayerData
(or any referencing classes) to use _options, keeping the initializer (new() {
PropertyNameCaseInsensitive = true }) unchanged so behavior is preserved.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7af5de6c-0079-4e4d-9332-58a5656f9ff1

📥 Commits

Reviewing files that changed from the base of the PR and between 295043c and 94e35f0.

⛔ Files ignored due to path filters (2)
  • src/Dotnet.Samples.AspNetCore.WebApi/Migrations/20250414191223_InitialCreate.cs is excluded by !**/Migrations/**
  • src/Dotnet.Samples.AspNetCore.WebApi/Migrations/20260329000000_NormalizePlayerDataset.cs is excluded by !**/Migrations/**
📒 Files selected for processing (1)
  • src/Dotnet.Samples.AspNetCore.WebApi/Utilities/PlayerData.cs

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 4, 2026

@nanotaboada nanotaboada merged commit b781936 into master Apr 4, 2026
9 checks passed
@nanotaboada nanotaboada deleted the chore/format-csharpier branch April 4, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant