Skip to content

Fix csproj path, refactor exceptions, and update tests - #37

Merged
FRACerqueira merged 3 commits into
mainfrom
develop
Aug 12, 2026
Merged

Fix csproj path, refactor exceptions, and update tests#37
FRACerqueira merged 3 commits into
mainfrom
develop

Conversation

@FRACerqueira

Copy link
Copy Markdown
Owner

This pull request includes several improvements and fixes across the codebase, focusing on exception handling, code quality, logging consistency, and CI/CD workflow correctness. The most important changes are summarized below.

Exception Handling and Validation

  • Changed thrown exceptions in RingBufferBuilder validation from IndexOutOfRangeException to InvalidOperationException for invalid configuration scenarios, and updated corresponding unit tests to expect the new exception type. [1] [2]

Code Quality and Analyzer Compliance

  • Added SuppressMessage attributes to suppress specific code analysis warnings in RingBufferManager and RingBufferExtension, justifying design decisions. [1] [2] [3]
  • Updated LangVersion to latest and added AnalysisLevel set to latest-recommended in RingBufferPlus.csproj for improved code analysis and language feature support.

Logging Consistency

  • Standardized logging message templates in RingBufferBuilder and RingBufferManager to use {Source} and {Message} placeholders for better log clarity. [1] [2]

CI/CD Workflow and Build Fixes

  • Corrected project paths in the publish.yml workflow to build and pack the correct project file (src/RingBufferPlus/RingBufferPlus.csproj).
  • Updated the build.yml workflow to skip tests on macOS runners, ensuring compatibility with available .NET runtimes.

Code Cleanup

  • Simplified a nested await using block in the sample program for improved readability.

Build and Pack referenced src/RingBufferPlus.csproj, which doesn't
exist - the project lives at src/RingBufferPlus/RingBufferPlus.csproj.
The release workflow would have failed on the next tag push.
- Changed validation exceptions in RingBufferBuilder to InvalidOperationException
- Updated log placeholders to PascalCase in RingBufferBuilder and RingBufferManager
- Added SuppressMessage attributes for code analysis in RingBufferManager and RingBufferExtension
- Refactored nested await using in Program.cs to single-line declaration
- Updated RingBufferPlus.csproj LangVersion and AnalysisLevel properties
Changed RingBufferBuilderTests to expect InvalidOperationException.
Configured build.yml to skip dotnet test on macOS runners.
@FRACerqueira
FRACerqueira merged commit 6c99687 into main Aug 12, 2026
9 checks passed
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