Fix csproj path, refactor exceptions, and update tests - #37
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
RingBufferBuildervalidation fromIndexOutOfRangeExceptiontoInvalidOperationExceptionfor invalid configuration scenarios, and updated corresponding unit tests to expect the new exception type. [1] [2]Code Quality and Analyzer Compliance
SuppressMessageattributes to suppress specific code analysis warnings inRingBufferManagerandRingBufferExtension, justifying design decisions. [1] [2] [3]LangVersiontolatestand addedAnalysisLevelset tolatest-recommendedinRingBufferPlus.csprojfor improved code analysis and language feature support.Logging Consistency
RingBufferBuilderandRingBufferManagerto use{Source}and{Message}placeholders for better log clarity. [1] [2]CI/CD Workflow and Build Fixes
publish.ymlworkflow to build and pack the correct project file (src/RingBufferPlus/RingBufferPlus.csproj).build.ymlworkflow to skip tests on macOS runners, ensuring compatibility with available .NET runtimes.Code Cleanup
await usingblock in the sample program for improved readability.