Skip to content

refactor: consolidate code style and improve readability#291

Merged
j-d-ha merged 19 commits into
mainfrom
refactor/reformat
Jan 25, 2026
Merged

refactor: consolidate code style and improve readability#291
j-d-ha merged 19 commits into
mainfrom
refactor/reformat

Conversation

@j-d-ha

@j-d-ha j-d-ha commented Jan 24, 2026

Copy link
Copy Markdown
Collaborator

🚀 Pull Request

📋 Summary

This PR consolidates and simplifies the codebase formatting standards, resulting in improved readability and consistency across all files.

Key Changes

  • Simplified ReSharper settings: Reduced .sln.DotSettings from 140 lines to 48 lines, removing extensive cleanup profiles and keeping only essential formatting rules
  • Improved multi-line formatting: Enhanced readability by adjusting line wrapping and indentation across the codebase
  • Normalized code style: Applied consistent formatting to 227 files, affecting ~2,300 insertions and ~3,500 deletions (net reduction in code complexity)
  • Updated build configuration: Improved formatting in Directory.Build.props and Directory.Packages.props

Motivation

The previous ReSharper settings included comprehensive cleanup profiles with extensive language-specific configurations. This PR streamlines the configuration to focus on core C# formatting rules, making the codebase more maintainable while improving readability through better multi-line wrapping.


✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests (N/A - formatting only)
  • I've added/updated documentation or README (N/A - no functional changes)
  • I've followed the coding style for this project
  • I've tested the changes locally (formatting applied consistently)

🧪 Related Issues or PRs

N/A - General code quality improvement


💬 Notes for Reviewers

This is a large-scale formatting change affecting 227 files. The changes are purely cosmetic and do not affect functionality:

  • No logic changes
  • No API changes
  • No breaking changes
  • All changes are automated formatting improvements

The ReSharper settings simplification removes verbose cleanup profiles while maintaining the essential formatting rules. The actual code changes are primarily:

  • Improved indentation and line wrapping
  • Consistent whitespace normalization
  • Better multi-line expression formatting

Recommend reviewing the ReSharper settings changes first (MinimalLambda.sln.DotSettings) to understand the new baseline, then spot-checking a few representative files to verify formatting improvements.

…s multiple files

- Corrected inconsistent parameter formatting in constructors and method declarations.
- Adjusted newline usage to ensure better readability and consistency in indentation.
- Standardized the wrapping of multi-line argument values and initializer blocks.
- Updated project references in .csproj files by removing unnecessary spaces for uniform formatting.
…ing across files

- Adjusted multi-line wrapping for better alignment of object initializers and method arguments.
- Unified indentation and newline usage in extensions, context factories, and test files.
- Streamlined YAML task configuration for cleanup code.
- Adjusted multi-line wrapping in method declarations, initializers, and object arguments.
- Normalized YAML formatting with new exclude/include properties for cleanup tasks.
- Standardized package reference formatting in `Directory.Packages.props`.
- Applied consistent wrapping and indentation in .cs and test files for readability.
…pping and indentation

- Unified formatting in method declarations, attribute usage, and object initializers.
- Improved line breaks and alignment across multiple files for better consistency.
- Applied consistent indentation in test files and context factories to enhance clarity.
- Removed `csharpier` definition from `.config/dotnet-tools.json`.
- Added new settings for LINQ query and multiline parameter alignment in `.DotSettings`.
- Updated YAML formatting in `pr-build.yaml` for proper spacing and consistency.
- Replaced `csharpier` formatting task with JetBrains cleanup code task in CI workflows.
@github-actions github-actions Bot added breaking-change Introduces a breaking change type: refactor Code refactoring labels Jan 24, 2026
@j-d-ha j-d-ha changed the title refactor(formatting): consolidate code style and improve readability refactor: consolidate code style and improve readability Jan 24, 2026
…tion

- Updated test commands in workflows to improve readability and verbosity control.
- Introduced `Directory.Build.props` for global .NET test configuration.
- Applied consistent formatting for YAML test steps across `pr-build.yaml` and `main-build.yaml`.
- Removed an unnecessary blank line from the `pr-build.yaml` workflow file for better consistency.
- Added `xunit.runner.json` to configure test runs with `maxParallelThreads` set to 1.
- Updated `.csproj` file to include `xunit.runner.json` with `CopyToOutputDirectory` set to `PreserveNewest`.
- Added `xunit.runner.json` to all test projects for uniform test configuration.
- Updated corresponding `.csproj` files to include `xunit.runner.json` with `CopyToOutputDirectory` set to `PreserveNewest`.
- Added `test:ci` task in `TestTasks.yml` for running the complete CI test suite.
- Updated `pr-build.yaml` and `main-build.yaml` to use `task test:ci` for test execution.
- Removed redundant inline test commands in workflow files for better maintainability.
@codecov

codecov Bot commented Jan 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.19231% with 77 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../MinimalLambda.Testing/LambdaApplicationFactory.cs 58.33% 10 Missing ⚠️
src/MinimalLambda.Testing/LambdaTestServer.cs 79.06% 7 Missing and 2 partials ⚠️
...enerators/SyntaxProviders/HandlerSyntaxProvider.cs 62.50% 6 Missing ⚠️
...Generators/Models/Middleware/UseMiddlewareTInfo.cs 70.58% 1 Missing and 4 partials ⚠️
...ourceGenerators/Diagnostics/DiagnosticGenerator.cs 0.00% 4 Missing ⚠️
...Lambda.SourceGenerators/Emitters/TemplateHelper.cs 33.33% 4 Missing ⚠️
...Generators/Extensions/ParameterSymbolExtensions.cs 82.60% 0 Missing and 4 partials ⚠️
....SourceGenerators/WellKnownTypes/WellKnownTypes.cs 42.85% 4 Missing ⚠️
src/MinimalLambda.Testing/TaskHelpers.cs 60.00% 2 Missing and 2 partials ⚠️
...da/Builder/Middleware/RequestEnvelopeMiddleware.cs 33.33% 2 Missing and 2 partials ⚠️
... and 16 more

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #291      +/-   ##
==========================================
- Coverage   87.49%   87.32%   -0.17%     
==========================================
  Files         131      131              
  Lines        3246     2919     -327     
  Branches      318      351      +33     
==========================================
- Hits         2840     2549     -291     
+ Misses        302      269      -33     
+ Partials      104      101       -3     
Files with missing lines Coverage Δ
.../MinimalLambda.Envelopes.Alb/AlbRequestEnvelope.cs 100.00% <ø> (ø)
...MinimalLambda.Envelopes.Alb/AlbResponseEnvelope.cs 100.00% <ø> (ø)
...malLambda.Envelopes.Alb/AlbResponseEnvelopeBase.cs 100.00% <ø> (ø)
...Envelopes/MinimalLambda.Envelopes.Alb/AlbResult.cs 91.30% <100.00%> (-0.37%) ⬇️
....Envelopes.ApiGateway/ApiGatewayRequestEnvelope.cs 100.00% <ø> (ø)
...Envelopes.ApiGateway/ApiGatewayResponseEnvelope.cs 100.00% <ø> (ø)
...malLambda.Envelopes.ApiGateway/ApiGatewayResult.cs 90.90% <100.00%> (-0.40%) ⬇️
...nvelopes.ApiGateway/ApiGatewayV2RequestEnvelope.cs 100.00% <ø> (ø)
...opes.ApiGateway/ApiGatewayV2RequestEnvelopeBase.cs 100.00% <ø> (ø)
...velopes.ApiGateway/ApiGatewayV2ResponseEnvelope.cs 100.00% <ø> (ø)
... and 83 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c0ee19...89b8327. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

j-d-ha and others added 9 commits January 24, 2026 17:09
- Modified `FormattingTasks.yml` to update `--include` paths for CleanupCode.
- Scoped paths to `src`, `test`, `examples`, and `benchmark` directories.
- Excluded unnecessary `bin` and `obj` directories to improve task efficiency.
- Added `.sonarqube/**/*` and `codecov*` to `--exclude` paths in `FormattingTasks.yml`.
- Ensures unnecessary directories are excluded from CleanupCode processing.
… .gitignore

- Removed `--exclude` paths in `CleanupCode` task configuration for better maintainability.
- Added `.sonarqube/` and `codecov*` entries to `.gitignore` to ensure proper file exclusion.
…ages.props`

- Added space before self-closing slashes in `<PackageVersion>` tags for consistency.
- Ensured uniform formatting across all package definitions.
…e unused dependencies

- Removed unnecessary `coverlet.collector` package references from test projects.
- Updated `<PackageVersion>` tag formatting in `Directory.Packages.props` for consistency.
…tory.Packages.props`

- Added spaces before self-closing slashes in `<PackageVersion>` tags for consistency.
- Ensured consistent tag formatting across all package definitions.
- Set `timeout-minutes` to 10 for primary job execution in `pr-build.yaml` and `main-build.yaml`.
- Added `timeout-minutes` of 3 for the test step to prevent prolonged executions.
@sonarqubecloud

Copy link
Copy Markdown

@j-d-ha
j-d-ha merged commit ac4874c into main Jan 25, 2026
8 checks passed
@j-d-ha
j-d-ha deleted the refactor/reformat branch January 25, 2026 01:01
@j-d-ha j-d-ha removed the breaking-change Introduces a breaking change label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant